summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-11-22 13:37:03 +0100
committerAleksander Machniak <alec@alec.pl>2013-11-22 13:37:03 +0100
commit571c109260fb8455594173f1ed6739f7351f53e1 (patch)
tree682bc6aa876f66136cb846e1bc5eb1e4830d8987 /skins/larry/ui.js
parent3bcc065831f95bfee180a62052e78d24020ebece (diff)
Make splitters more responsive (using timing events)
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 7cc795432..ae8ae5c55 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -1292,6 +1292,18 @@ function rcube_splitter(p)
if (!me.drag_active)
return false;
+ // with timing events dragging action is more responsive
+ window.clearTimeout(me.ts);
+ me.ts = window.setTimeout(function() { onDragAction(e); }, 1);
+
+ return false;
+ };
+
+ /**
+ * Dragging action (see onDrag())
+ */
+ function onDragAction(e)
+ {
var pos = rcube_event.get_mouse_pos(e);
if (me.relative) {
@@ -1315,7 +1327,6 @@ function rcube_splitter(p)
me.p1pos = me.relative ? me.p1.position() : me.p1.offset();
me.p2pos = me.relative ? me.p2.position() : me.p2.offset();
- return false;
};
/**