summaryrefslogtreecommitdiffstats
path: root/client/lib/escapeActions.js
diff options
context:
space:
mode:
authorMaxime Quandalle <maxime@quandalle.com>2015-08-28 03:35:18 +0200
committerMaxime Quandalle <maxime@quandalle.com>2015-08-28 03:35:18 +0200
commit5eb67e803af0fd674f85a80e47913fa13fed24b2 (patch)
treeaa13e102e4d227d3ed546be959fb504be74326cd /client/lib/escapeActions.js
parentb5dabfe88695a8f8211b29fea0dc16131c9a1829 (diff)
downloadwekan-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.js22
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) {