From f642c2a11b8dc334328c6188c71ded587989989f Mon Sep 17 00:00:00 2001 From: qweasz687 <66411718+qweasz687@users.noreply.github.com> Date: Tue, 10 Aug 2021 15:39:40 +0800 Subject: [PATCH] Update events.js --- libs/events.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/events.js b/libs/events.js index a63c887e..e01801a3 100644 --- a/libs/events.js +++ b/libs/events.js @@ -1533,6 +1533,16 @@ events.prototype._action_setViewport = function (data, x, y, prefix) { this.__action_doAsyncFunc(data.async, core.moveViewport, data.loc[0], data.loc[1], data.moveMode, data.time); } +events.prototype._action_lockViewport = function (data, x, y, prefix) { + flags.__lockViewport__ = true; + core.doAction(); +} + +events.prototype._action_unlockViewport = function (data, x, y, prefix) { + flags.__lockViewport__ = false; + core.doAction(); +} + events.prototype._action_move = function (data, x, y, prefix) { var loc = this.__action_getLoc(data.loc, x, y, prefix); this.__action_doAsyncFunc(data.async, core.moveBlock, loc[0], loc[1], data.steps, data.time, data.keep);