mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
Fixes Custom Fields (Turtle) Demo Browser Support (#2697)
* Fixed firefox not displaying correctly. * Fixed IE support.
This commit is contained in:
@@ -455,11 +455,18 @@ CustomFields.FieldTurtle.prototype.updateColour = function() {
|
||||
|
||||
var child = this.turtleGroup_.firstChild;
|
||||
while(child) {
|
||||
// If it is a text node, or a non-turtle node.
|
||||
if (child.nodeType == 3 || !child.classList.contains('turtleBody')) {
|
||||
// If it is a text node, continue.
|
||||
if (child.nodeType == 3) {
|
||||
child = child.nextSibling;
|
||||
continue;
|
||||
}
|
||||
// Or if it is a non-turtle node, continue.
|
||||
var className = child.getAttribute('class');
|
||||
if (!className || className.indexOf('turtleBody') == -1) {
|
||||
child = child.nextSibling;
|
||||
continue;
|
||||
}
|
||||
|
||||
child.style.fill = fillColour;
|
||||
child.style.stroke = borderColour;
|
||||
child = child.nextSibling;
|
||||
|
||||
@@ -40,16 +40,16 @@
|
||||
<input type="button" value="Import from XML" onclick="fromXml()">
|
||||
</p>
|
||||
|
||||
<table style="width: 800px; height: 480px">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<textarea id="importExport"
|
||||
style="width: 200px; height: 100%;"
|
||||
style="width: 200px; height: 480px;"
|
||||
onchange="textAreaChange();"
|
||||
onkeyup="textAreaChange()"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<div id="blocklyDiv" style="width: 600px; height: 100%;"></div>
|
||||
<div id="blocklyDiv" style="width: 600px; height: 480px;"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user