diff options
author | Maxime Quandalle <maxime@quandalle.com> | 2015-08-28 03:35:18 +0200 |
---|---|---|
committer | Maxime Quandalle <maxime@quandalle.com> | 2015-08-28 03:35:18 +0200 |
commit | 5eb67e803af0fd674f85a80e47913fa13fed24b2 (patch) | |
tree | aa13e102e4d227d3ed546be959fb504be74326cd /client/lib/escapeActions.js | |
parent | b5dabfe88695a8f8211b29fea0dc16131c9a1829 (diff) | |
download | wekan-5eb67e803af0fd674f85a80e47913fa13fed24b2.tar.gz wekan-5eb67e803af0fd674f85a80e47913fa13fed24b2.tar.bz2 wekan-5eb67e803af0fd674f85a80e47913fa13fed24b2.zip |
Implement click-and-drag integration to translate the board canvas
Fixes #232
Diffstat (limited to 'client/lib/escapeActions.js')
-rw-r--r-- | client/lib/escapeActions.js | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/client/lib/escapeActions.js b/client/lib/escapeActions.js index 1297cfb0..fa113bf3 100644 --- a/client/lib/escapeActions.js +++ b/client/lib/escapeActions.js @@ -4,6 +4,8 @@ // escape we execute the action which have a valid condition and his the highest // in the label hierarchy. EscapeActions = { + _nextclickPrevented: false, + _actions: [], // Executed in order @@ -60,12 +62,20 @@ EscapeActions = { }, clickExecute: function(target, maxLabel) { - return this._execute({ - maxLabel: maxLabel, - multipleActions: false, - isClick: true, - clickTarget: target - }); + if (this._nextclickPrevented) { + this._nextclickPrevented = false; + } else { + return this._execute({ + maxLabel: maxLabel, + multipleActions: false, + isClick: true, + clickTarget: target + }); + } + }, + + preventNextClick: function() { + this._nextclickPrevented = true; }, _stopClick: function(action, clickTarget) { |