Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
ardublockly
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
ardublockly
Commits
c82c460d
Commit
c82c460d
authored
Sep 30, 2015
by
Neil Fraser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move icon reference to block SVG.
No functional change.
parent
7db8ce94
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
6 deletions
+13
-6
core/block.js
core/block.js
+0
-6
core/block_svg.js
core/block_svg.js
+13
-0
No files found.
core/block.js
View file @
c82c460d
...
@@ -508,12 +508,6 @@ Blockly.Block.prototype.setEditable = function(editable) {
...
@@ -508,12 +508,6 @@ Blockly.Block.prototype.setEditable = function(editable) {
field
.
updateEditable
();
field
.
updateEditable
();
}
}
}
}
if
(
this
.
rendered
)
{
var
icons
=
this
.
getIcons
();
for
(
var
i
=
0
;
i
<
icons
.
length
;
i
++
)
{
icons
[
i
].
updateEditable
();
}
}
};
};
/**
/**
...
...
core/block_svg.js
View file @
c82c460d
...
@@ -789,6 +789,19 @@ Blockly.BlockSvg.prototype.setMovable = function(movable) {
...
@@ -789,6 +789,19 @@ Blockly.BlockSvg.prototype.setMovable = function(movable) {
this
.
updateMovable
();
this
.
updateMovable
();
};
};
/**
* Set whether this block is editable or not.
* @param {boolean} movable True if editable.
*/
Blockly
.
BlockSvg
.
prototype
.
setEditable
=
function
(
editable
)
{
Blockly
.
BlockSvg
.
superClass_
.
setEditable
.
call
(
this
,
editable
);
if
(
this
.
rendered
)
{
for
(
var
i
=
0
;
i
<
this
.
icons_
.
length
;
i
++
)
{
this
.
icons_
[
i
].
updateEditable
();
}
}
};
/**
/**
* Return the root node of the SVG or null if none exists.
* Return the root node of the SVG or null if none exists.
* @return {Element} The root SVG node (probably a group).
* @return {Element} The root SVG node (probably a group).
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment