Fix FF editor location by a pixel.

This commit is contained in:
Neil Fraser
2015-08-21 14:13:07 -07:00
parent fe12aeee93
commit f601bdc3c7
4 changed files with 16 additions and 8 deletions

View File

@@ -227,13 +227,13 @@ Blockly.Field.prototype.getSize = function() {
/**
* Returns the height and width of the field,
* accounting for the workspace scaling.
* @return {!Object} Height and width.
* @return {!goog.math.Size} Height and width.
*/
Blockly.Field.prototype.getScaledBBox_ = function() {
var bBox = this.borderRect_.getBBox();
// Create new object, as getBBox can return an uneditable SVGRect.
return {width: bBox.width * this.sourceBlock_.workspace.scale,
height: bBox.height * this.sourceBlock_.workspace.scale};
// Create new object, as getBBox can return an uneditable SVGRect in IE.
return new goog.math.Size(bBox.width * this.sourceBlock_.workspace.scale,
bBox.height * this.sourceBlock_.workspace.scale);
};
/**