Closed GoogleCodeExporter closed 8 years ago
Toby, can you take a look at this? It looks like my recent refactoring broke
the coordinate system.
Original comment by neil.fra...@gmail.com
on 3 Sep 2013 at 6:00
[deleted comment]
I'm currently having a similar problem. I have tested Blockly in Android
Browser (Android 2.3.6) and Windows Phone but i doesn't work, in particular it
doesn't render the left menubar (so i can't even see the blocks). Has anyone
come out with a solution? Is there a version that actually works on Android
Browser?
Original comment by andresne...@hotmail.com
on 18 Sep 2013 at 5:37
IE 10 fails with SCRIPT5022: NoModificationAllowedError
Original comment by luismarianoguerra@gmail.com
on 24 Sep 2013 at 8:24
the offending line is this one:
http://code.google.com/p/blockly/source/browse/trunk/core/block.js#411
if commented it works on IE 10
Original comment by luismarianoguerra@gmail.com
on 25 Sep 2013 at 10:27
the standard says that you can't modify the attributes of a bbox
http://www.w3.org/TR/SVG/types.html#InterfaceSVGRect
Attributes:
x (float)
The x coordinate of the rectangle, in user units.
Exceptions on setting
DOMException, code NO_MODIFICATION_ALLOWED_ERR
Raised when the rectangle corresponds to a read only attribute or when the object itself is read only.
Original comment by luismarianoguerra@gmail.com
on 25 Sep 2013 at 10:41
this seems to fix it
$ svn diff core/block.js
Index: core/block.js
===================================================================
--- core/block.js (revision 1380)
+++ core/block.js (working copy)
@@ -390,7 +390,8 @@
*/
Blockly.Block.prototype.getHeightWidth = function() {
try {
- var bBox = this.getSvgRoot().getBBox();
+ var bBox = this.getSvgRoot().getBBox(),
+ height = bBox.height;
} catch (e) {
// Firefox has trouble with hidden elements (Bug 528969).
return {height: 0, width: 0};
@@ -401,15 +402,15 @@
bounding box. The render functions (below) add two 5px spacer control
points that we need to subtract.
*/
- bBox.height -= 10;
+ height -= 10;
if (this.nextConnection) {
// Bottom control point partially masked by lower tab.
- bBox.height += 4;
+ height += 4;
}
}
// Subtract one from the height due to the shadow.
- bBox.height -= 1;
- return bBox;
+ height -= 1;
+ return {height: height, width: bBox.width};
};
/**
Original comment by luismarianoguerra@gmail.com
on 25 Sep 2013 at 10:49
Fixed in r1389. Thanks for the patch!
Original comment by neil.fra...@gmail.com
on 30 Sep 2013 at 10:16
Original issue reported on code.google.com by
jungwon....@gmail.com
on 3 Sep 2013 at 3:25Attachments: