diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index dc0784d0..6acd1a14 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -2084,13 +2084,15 @@ return code; */; stopAnimate_s - : '停止所有动画' Newline + : '停止所有动画' '执行动画回调' Bool Newline /* stopAnimate_s tooltip : stopAnimate:停止所有动画 helpUrl : /_docs/#/instruction +default : [false] colour : this.soundColor -var code = '{"type": "stopAnimate"},\n'; +Bool_0 = Bool_0?', "doCallback": true':''; +var code = '{"type": "stopAnimate"'+Bool_0+'},\n'; return code; */; diff --git a/_server/MotaActionParser.js b/_server/MotaActionParser.js index 0565e5b9..caa2cff1 100644 --- a/_server/MotaActionParser.js +++ b/_server/MotaActionParser.js @@ -560,7 +560,7 @@ ActionParser.prototype.parseAction = function() { } break; case "stopAnimate": // 停止所有动画 - this.next = MotaActionBlocks['stopAnimate_s'].xmlText([this.next]); + this.next = MotaActionBlocks['stopAnimate_s'].xmlText([data.doCallback||false,this.next]); break; case "setViewport": // 设置视角 if (data.dxy) { diff --git a/libs/events.js b/libs/events.js index 7db1508c..70f01d15 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1536,7 +1536,7 @@ events.prototype._action_animate = function (data, x, y, prefix) { } events.prototype._action_stopAnimate = function (data, x, y, prefix) { - core.stopAnimate(); + core.stopAnimate(data.doCallback); core.doAction(); }