diff --git a/bower.json b/bower.json index 1a79ba064..35cd46986 100644 --- a/bower.json +++ b/bower.json @@ -29,6 +29,7 @@ "es6-promise": "^4.0.5", "lru-cache": "2.7.3", "seiyria-bootstrap-slider": "9.7.x", + "big-integer": "https://github.com/peterolson/BigInteger.js.git#^1.6.22", "file-saver": "filesaver#^1.3.3" } } diff --git a/static/compiler.js b/static/compiler.js index 981066dc0..18a77b4fc 100644 --- a/static/compiler.js +++ b/static/compiler.js @@ -36,6 +36,7 @@ define(function (require) { var LruCache = require('lru-cache'); var monaco = require('monaco'); var Alert = require('alert'); + var bigInt = require('big-integer'); require('asm-mode'); require('selectize'); @@ -233,7 +234,7 @@ define(function (require) { }, this)); this.container.layoutManager.createDragSource( - this.domRoot.optButton, createOptView.bind(this)); + this.optButton, createOptView.bind(this)); this.optButton.click(_.bind(function () { var insertPoint = hub.findParentRowOrColumn(this.container) || @@ -619,9 +620,14 @@ define(function (require) { function getNumericToolTip(value) { var match = hexLike.exec(value); - if (match) return value + ' = ' + parseInt(match[2], 16).toString(); - match = decimalLike.exec(value); - if (match) return value + ' = 0x' + parseInt(match[2]).toString(16); + if (match) { + return value + ' = ' + bigInt(match[2], 16).toString(10); + } + match = decimalLike.exec(value); + if (match) { + return value + ' = 0x' + bigInt(match[2]).toString(16).toUpperCase(); + } + return null; } diff --git a/static/main.js b/static/main.js index 9bc5d012e..9f226c32d 100644 --- a/static/main.js +++ b/static/main.js @@ -35,6 +35,7 @@ require.config({ events: 'ext/eventEmitter/EventEmitter', lzstring: 'ext/lz-string/libs/lz-string', clipboard: 'ext/clipboard/dist/clipboard', + 'big-integer': 'ext/big-integer/BigInteger.min', 'raven-js': 'ext/raven-js/dist/raven', 'es6-promise': 'ext/es6-promise/es6-promise', 'lru-cache': 'ext/lru-cache/lib/lru-cache', diff --git a/static/output.js b/static/output.js index 156a9dc34..99eb12491 100644 --- a/static/output.js +++ b/static/output.js @@ -30,7 +30,6 @@ define(function (require) { var FontScale = require('fontscale'); function Output(hub, container, state) { - var self = this; this.container = container; this.compilerId = state.compiler; this.editorId = state.editor; diff --git a/static/sharing.js b/static/sharing.js index 7db01d2d6..afaf5713e 100644 --- a/static/sharing.js +++ b/static/sharing.js @@ -62,12 +62,6 @@ define(function (require) { } } - function getItemsByComponent(layout, component) { - return layout.root.getItemsByFilter(function (o) { - return o.type === "component" && o.componentName === component; - }); - } - function getEmbeddedUrl(layout, readOnly) { var location = window.location.origin + window.location.pathname; if (location[location.length - 1] !== '/') location += '/';