From b384d1f87952eb3576209a9dd2278897610f07eb Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 7 Feb 2022 03:27:06 +0300 Subject: [PATCH] some tweaking... Signed-off-by: Alex A. Naanou --- Viewer/features/core.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Viewer/features/core.js b/Viewer/features/core.js index 06294430..8b84fb35 100755 --- a/Viewer/features/core.js +++ b/Viewer/features/core.js @@ -2003,11 +2003,11 @@ var JournalActions = actions.Actions({ action: action, args: [...arguments], current: this.current, - // set in the post handler... + // NOTE: we set this after the action is done... target: undefined, } - // get action method handling aliases... + // helper: get action method handling aliases... var _getActionMethod = function(action, attr){ var meth = that.getActionAttr(action, attr) while(typeof(meth) == typeof('str')){ @@ -2018,12 +2018,13 @@ var JournalActions = actions.Actions({ var test = _getActionMethod(action, 'undoable') if(test && !test.call(that, data)){ return } - // prep to get additional undo state... - var update = _getActionMethod(action, 'getUndoState') // journal after the action is done... return function(){ data.target = this.current + + // prep to get additional undo state... + var update = _getActionMethod(action, 'getUndoState') update && update instanceof Function && update.call(that, data)