diff --git a/core/blockly.js b/core/blockly.js index 29d2f026b..fa8a9926c 100644 --- a/core/blockly.js +++ b/core/blockly.js @@ -604,4 +604,3 @@ if (!goog.global['Blockly']) { } goog.global['Blockly']['getMainWorkspace'] = Blockly.getMainWorkspace; goog.global['Blockly']['addChangeListener'] = Blockly.addChangeListener; -goog.global['Blockly']['removeChangeListener'] = Blockly.removeChangeListener; diff --git a/core/connection.js b/core/connection.js index fe8ac063c..643e7fda4 100644 --- a/core/connection.js +++ b/core/connection.js @@ -364,7 +364,7 @@ Blockly.Connection.prototype.highlight = function() { Blockly.Connection.highlightedPath_ = Blockly.createSvgElement('path', {'class': 'blocklyHighlightedConnectionPath', 'd': steps, - transform: 'translate(' + x + ', ' + y + ')'}, + transform: 'translate(' + x + ',' + y + ')'}, this.sourceBlock_.getSvgRoot()); }; @@ -391,7 +391,7 @@ Blockly.Connection.prototype.tighten_ = function() { } var xy = Blockly.getRelativeXY_(svgRoot); block.getSvgRoot().setAttribute('transform', - 'translate(' + (xy.x - dx) + ', ' + (xy.y - dy) + ')'); + 'translate(' + (xy.x - dx) + ',' + (xy.y - dy) + ')'); block.moveConnections_(-dx, -dy); } }; diff --git a/core/field_angle.js b/core/field_angle.js index ac3404f1a..8fb311fcc 100644 --- a/core/field_angle.js +++ b/core/field_angle.js @@ -162,8 +162,8 @@ Blockly.FieldAngle.prototype.showEditor_ = function() { (a % 45 == 0 ? 10 : 5), 'y2': Blockly.FieldAngle.HALF, 'class': 'blocklyAngleMarks', - 'transform': 'rotate(' + a + ', ' + - Blockly.FieldAngle.HALF + ', ' + Blockly.FieldAngle.HALF + ')' + 'transform': 'rotate(' + a + ',' + + Blockly.FieldAngle.HALF + ',' + Blockly.FieldAngle.HALF + ')' }, svg); } svg.style.marginLeft = (15 - Blockly.FieldAngle.RADIUS) + 'px'; @@ -242,7 +242,7 @@ Blockly.FieldAngle.prototype.updateGraph_ = function() { var angleRadians = goog.math.toRadians(Number(this.getText())); if (isNaN(angleRadians)) { this.gauge_.setAttribute('d', - 'M ' + Blockly.FieldAngle.HALF + ', ' + Blockly.FieldAngle.HALF); + 'M ' + Blockly.FieldAngle.HALF + ',' + Blockly.FieldAngle.HALF); this.line_.setAttribute('x2', Blockly.FieldAngle.HALF); this.line_.setAttribute('y2', Blockly.FieldAngle.HALF); } else { @@ -252,7 +252,7 @@ Blockly.FieldAngle.prototype.updateGraph_ = function() { -Blockly.FieldAngle.RADIUS; var largeFlag = (angleRadians > Math.PI) ? 1 : 0; this.gauge_.setAttribute('d', - 'M ' + Blockly.FieldAngle.HALF + ', ' + Blockly.FieldAngle.HALF + + 'M ' + Blockly.FieldAngle.HALF + ',' + Blockly.FieldAngle.HALF + ' h ' + Blockly.FieldAngle.RADIUS + ' A ' + Blockly.FieldAngle.RADIUS + ',' + Blockly.FieldAngle.RADIUS + ' 0 ' + largeFlag + ' 0 ' + x + ',' + y + ' z'); diff --git a/core/icon.js b/core/icon.js index 9135d2f36..41d9f1962 100644 --- a/core/icon.js +++ b/core/icon.js @@ -171,7 +171,7 @@ Blockly.Icon.prototype.renderIcon = function(cursorX) { cursorX -= width; } this.iconGroup_.setAttribute('transform', - 'translate(' + cursorX + ', ' + TOP_MARGIN + ')'); + 'translate(' + cursorX + ',' + TOP_MARGIN + ')'); this.computeIconLocation(); if (this.block_.RTL) { cursorX -= Blockly.BlockSvg.SEP_SPACE_X; diff --git a/core/scrollbar.js b/core/scrollbar.js index 34c4bd77c..864c125e8 100644 --- a/core/scrollbar.js +++ b/core/scrollbar.js @@ -262,7 +262,7 @@ Blockly.Scrollbar.prototype.resize = function(opt_metrics) { this.yCoordinate = hostMetrics.absoluteTop + hostMetrics.viewHeight - Blockly.Scrollbar.scrollbarThickness - 0.5; this.svgGroup_.setAttribute('transform', - 'translate(' + this.xCoordinate + ', ' + this.yCoordinate + ')'); + 'translate(' + this.xCoordinate + ',' + this.yCoordinate + ')'); this.svgBackground_.setAttribute('width', Math.max(0, outerLength)); this.svgKnob_.setAttribute('x', this.constrainKnob_(innerOffset)); } else { @@ -290,7 +290,7 @@ Blockly.Scrollbar.prototype.resize = function(opt_metrics) { } this.yCoordinate = hostMetrics.absoluteTop + 0.5; this.svgGroup_.setAttribute('transform', - 'translate(' + this.xCoordinate + ', ' + this.yCoordinate + ')'); + 'translate(' + this.xCoordinate + ',' + this.yCoordinate + ')'); this.svgBackground_.setAttribute('height', Math.max(0, outerLength)); this.svgKnob_.setAttribute('y', this.constrainKnob_(innerOffset)); } diff --git a/core/trashcan.js b/core/trashcan.js index 708e5c1fd..3980c110a 100644 --- a/core/trashcan.js +++ b/core/trashcan.js @@ -41,20 +41,6 @@ Blockly.Trashcan = function(workspace) { this.workspace_ = workspace; }; -/** - * URL of the sprite image. - * @type {string} - * @private - */ -Blockly.Trashcan.prototype.SPRITE_URL_ = 'media/sprites.png'; - -/** - * URL of the lid image. - * @type {string} - * @private - */ -Blockly.Trashcan.prototype.LID_URL_ = 'media/trashlid.png'; - /** * Width of both the trash can and lid images. * @type {number} @@ -275,8 +261,8 @@ Blockly.Trashcan.prototype.animateLid_ = function() { this.lidOpen_ = goog.math.clamp(this.lidOpen_, 0, 1); var lidAngle = this.lidOpen_ * 45; this.svgLid_.setAttribute('transform', 'rotate(' + - (this.workspace_.RTL ? -lidAngle : lidAngle) + ', ' + - (this.workspace_.RTL ? 4 : this.WIDTH_ - 4) + ', ' + + (this.workspace_.RTL ? -lidAngle : lidAngle) + ',' + + (this.workspace_.RTL ? 4 : this.WIDTH_ - 4) + ',' + (this.LID_HEIGHT_ - 2) + ')'); var opacity = goog.math.lerp(0.4, 0.8, this.lidOpen_); this.svgGroup_.style.opacity = opacity;