From: Aleksander Ɓukasz Date: Tue, 22 Apr 2014 13:17:54 +0000 (+0200) Subject: editor: removed unused code X-Git-Url: https://git.mdrn.pl/fnpeditor.git/commitdiff_plain/e1d56851ab750cfa9a76574f84dd94da24b2d264?ds=sidebyside editor: removed unused code --- diff --git a/src/editor/modules/documentToolbar/documentToolbar.js b/src/editor/modules/documentToolbar/documentToolbar.js index 82b6dca..b66734f 100644 --- a/src/editor/modules/documentToolbar/documentToolbar.js +++ b/src/editor/modules/documentToolbar/documentToolbar.js @@ -7,8 +7,6 @@ return function(sandbox) { var addedActions = [], contextParams = {}, - contextDefer = {}, - duringClick = false, document, canvas; var view = { @@ -31,17 +29,6 @@ return function(sandbox) { group.append(view.dom); view.on('actionExecuted', function(action, ret) { sandbox.publish('actionExecuted', action, ret); - duringClick = false; - _.pairs(contextDefer).forEach(function(pair) { - var what = pair[0], - deferred = pair[1]; - if(deferred) { - refreshContextParam(what); - } - }); - }); - view.on('mousedown', function() { - duringClick = true; }); view.on('hover', function() { @@ -61,14 +48,6 @@ return function(sandbox) { var setContextParam = function(what, ctx) { contextParams[what] = ctx; - if(duringClick) { - contextDefer[what] = true; - } else { - refreshContextParam(what); - } - }; - - var refreshContextParam = function(what) { addedActions.forEach(function(action) { action.updateContextParam(what, contextParams[what]); });