mirror of
https://github.com/google/blockly.git
synced 2026-01-06 00:20:37 +01:00
Fixed comment ownership. (#2923)
* Moved comment icons to use a model-based system. The block holds the model of the comment, and the comment icon holds a reference to it. * Reorganized the setVisible function. * Changed how xml.js serializes and deserializes comments.
This commit is contained in:
committed by
Sam El-Husseini
parent
0726e4a909
commit
9e5df6216a
@@ -240,8 +240,9 @@ Blockly.PHP.scrub_ = function(block, code, opt_thisOnly) {
|
||||
if (!block.outputConnection || !block.outputConnection.targetConnection) {
|
||||
// Collect comment for this block.
|
||||
var comment = block.getCommentText();
|
||||
comment = Blockly.utils.string.wrap(comment, Blockly.PHP.COMMENT_WRAP - 3);
|
||||
if (comment) {
|
||||
comment = Blockly.utils.string.wrap(comment,
|
||||
Blockly.PHP.COMMENT_WRAP - 3);
|
||||
commentCode += Blockly.PHP.prefixLines(comment, '// ') + '\n';
|
||||
}
|
||||
// Collect comments for all value arguments.
|
||||
|
||||
Reference in New Issue
Block a user