stopAnimate doCallback

This commit is contained in:
ckcz123 2021-09-03 10:30:15 +08:00
parent 265bf64e5e
commit 28536f31b0
3 changed files with 6 additions and 4 deletions

View File

@ -2084,13 +2084,15 @@ return code;
*/; */;
stopAnimate_s stopAnimate_s
: '停止所有动画' Newline : '停止所有动画' '执行动画回调' Bool Newline
/* stopAnimate_s /* stopAnimate_s
tooltip : stopAnimate停止所有动画 tooltip : stopAnimate停止所有动画
helpUrl : /_docs/#/instruction helpUrl : /_docs/#/instruction
default : [false]
colour : this.soundColor colour : this.soundColor
var code = '{"type": "stopAnimate"},\n'; Bool_0 = Bool_0?', "doCallback": true':'';
var code = '{"type": "stopAnimate"'+Bool_0+'},\n';
return code; return code;
*/; */;

View File

@ -560,7 +560,7 @@ ActionParser.prototype.parseAction = function() {
} }
break; break;
case "stopAnimate": // 停止所有动画 case "stopAnimate": // 停止所有动画
this.next = MotaActionBlocks['stopAnimate_s'].xmlText([this.next]); this.next = MotaActionBlocks['stopAnimate_s'].xmlText([data.doCallback||false,this.next]);
break; break;
case "setViewport": // 设置视角 case "setViewport": // 设置视角
if (data.dxy) { if (data.dxy) {

View File

@ -1536,7 +1536,7 @@ events.prototype._action_animate = function (data, x, y, prefix) {
} }
events.prototype._action_stopAnimate = function (data, x, y, prefix) { events.prototype._action_stopAnimate = function (data, x, y, prefix) {
core.stopAnimate(); core.stopAnimate(data.doCallback);
core.doAction(); core.doAction();
} }