From 4cc2f00919aa43ddcd55a010c52888442df517b2 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 8 Mar 2021 02:48:33 +0100 Subject: [PATCH] Up command --- src/commands/view/SwitchVisibility.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/view/SwitchVisibility.js b/src/commands/view/SwitchVisibility.js index 8dba5761d..6f58639c1 100644 --- a/src/commands/view/SwitchVisibility.js +++ b/src/commands/view/SwitchVisibility.js @@ -16,11 +16,9 @@ export default { toggleVis(ed, active = 1) { if (!ed.Commands.isActive('preview')) { const cv = ed.Canvas; + const mth = active ? 'on' : 'off'; cv.getFrames().forEach(frame => this._upFrame(frame, active)); - cv.getModel()[active ? 'on' : 'off']( - 'change:frames', - this._onFramesChange - ); + cv.getModel()[mth]('change:frames', this._onFramesChange); } },