优化blockly多行
This commit is contained in:
parent
804e5a4039
commit
6291d1ea65
@ -2055,37 +2055,37 @@ return code;
|
|||||||
*/;
|
*/;
|
||||||
|
|
||||||
animate_s
|
animate_s
|
||||||
: '显示动画' IdString '位置' 'x' PosString? 'y' PosString? '相对窗口坐标' Bool '不等待执行完毕' Bool Newline
|
: '显示动画' EvalString '位置' 'x' PosString? 'y' PosString? '相对窗口坐标' Bool '不等待执行完毕' Bool Newline
|
||||||
|
|
||||||
|
|
||||||
/* animate_s
|
/* animate_s
|
||||||
tooltip : animate:显示动画,位置填hero或者1,2形式的位置,或者不填代表当前事件点
|
tooltip : animate:显示动画,位置填hero或者1,2形式的位置,或者不填代表当前事件点
|
||||||
helpUrl : /_docs/#/instruction
|
helpUrl : /_docs/#/instruction
|
||||||
default : ["zone","","",false,false]
|
default : ["zone","","",false,false]
|
||||||
allAnimates : ['IdString_0']
|
allAnimates : ['EvalString_0']
|
||||||
material : ["./project/animates/", "IdString_0"]
|
material : ["./project/animates/", "EvalString_0"]
|
||||||
menu : [['选择位置', 'editor_blockly.selectPoint(block, ["PosString_0", "PosString_1"])']]
|
menu : [['选择位置', 'editor_blockly.selectPoint(block, ["PosString_0", "PosString_1"])']]
|
||||||
colour : this.soundColor
|
colour : this.soundColor
|
||||||
var loc = PosString_0&&PosString_1?(', "loc": ['+PosString_0+','+PosString_1+']'):'';
|
var loc = PosString_0&&PosString_1?(', "loc": ['+PosString_0+','+PosString_1+']'):'';
|
||||||
Bool_0 = Bool_0?', "alignWindow": true':'';
|
Bool_0 = Bool_0?', "alignWindow": true':'';
|
||||||
Bool_1 = Bool_1?', "async": true':'';
|
Bool_1 = Bool_1?', "async": true':'';
|
||||||
var code = '{"type": "animate", "name": "'+IdString_0+'"'+loc+Bool_0+Bool_1+'},\n';
|
var code = '{"type": "animate", "name": "'+EvalString_0+'"'+loc+Bool_0+Bool_1+'},\n';
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
animate_1_s
|
animate_1_s
|
||||||
: '显示动画并跟随角色' IdString '不等待执行完毕' Bool Newline
|
: '显示动画并跟随角色' EvalString '不等待执行完毕' Bool Newline
|
||||||
|
|
||||||
|
|
||||||
/* animate_1_s
|
/* animate_1_s
|
||||||
tooltip : animate:显示动画并跟随角色
|
tooltip : animate:显示动画并跟随角色
|
||||||
helpUrl : /_docs/#/instruction
|
helpUrl : /_docs/#/instruction
|
||||||
default : ["zone",false]
|
default : ["zone",false]
|
||||||
allAnimates : ['IdString_0']
|
allAnimates : ['EvalString_0']
|
||||||
material : ["./project/animates/", "IdString_0"]
|
material : ["./project/animates/", "EvalString_0"]
|
||||||
colour : this.soundColor
|
colour : this.soundColor
|
||||||
Bool_0 = Bool_0?', "async": true':'';
|
Bool_0 = Bool_0?', "async": true':'';
|
||||||
var code = '{"type": "animate", "name": "'+IdString_0+'", "loc": "hero"'+Bool_0+'},\n';
|
var code = '{"type": "animate", "name": "'+EvalString_0+'", "loc": "hero"'+Bool_0+'},\n';
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
|
|||||||
@ -1188,4 +1188,17 @@ Blockly.FieldDropdown.prototype.doValueUpdate_ = function (newValue) {
|
|||||||
options.push([this.value_, this.value_]);
|
options.push([this.value_, this.value_]);
|
||||||
this.selectedOption_ = options[options.length - 1];
|
this.selectedOption_ = options[options.length - 1];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Blockly.FieldMultilineInput.prototype.getDisplayText_ = function() {
|
||||||
|
var value = this.value_;
|
||||||
|
if (!value) return Blockly.Field.NBSP;
|
||||||
|
var curr = '', text = '';
|
||||||
|
for (var i = 0; i < value.length; ++i) {
|
||||||
|
if (value[i] == '\n' || curr.length == this.maxDisplayLength) {
|
||||||
|
text += curr.replace(/\s/g, Blockly.Field.NBSP) + '\n';
|
||||||
|
curr = value[i] == '\n' ? '' : value[i];
|
||||||
|
} else curr += value[i];
|
||||||
|
}
|
||||||
|
return text + curr;
|
||||||
|
};
|
||||||
|
|||||||
2
_server/thirdparty/caret-position.js
vendored
2
_server/thirdparty/caret-position.js
vendored
@ -109,7 +109,7 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!isInput)
|
if (!isInput)
|
||||||
style.whiteSpace = 'pre';
|
style.whiteSpace = 'pre-wrap';
|
||||||
|
|
||||||
if (isFirefox) {
|
if (isFirefox) {
|
||||||
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
|
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user