Page MenuHomePhabricator

D11483.diff
No OneTemporary

D11483.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -199,7 +199,7 @@
'rsrc/externals/javelin/lib/Resource.js' => '44959b73',
'rsrc/externals/javelin/lib/Routable.js' => 'b3e7d692',
'rsrc/externals/javelin/lib/Router.js' => '29274e2b',
- 'rsrc/externals/javelin/lib/Scrollbar.js' => 'e8e4c640',
+ 'rsrc/externals/javelin/lib/Scrollbar.js' => '65a65098',
'rsrc/externals/javelin/lib/URI.js' => '6eff08aa',
'rsrc/externals/javelin/lib/Vector.js' => 'cc1bd0b0',
'rsrc/externals/javelin/lib/WebSocket.js' => '3f840822',
@@ -673,7 +673,7 @@
'javelin-resource' => '44959b73',
'javelin-routable' => 'b3e7d692',
'javelin-router' => '29274e2b',
- 'javelin-scrollbar' => 'e8e4c640',
+ 'javelin-scrollbar' => '65a65098',
'javelin-stratcom' => '8b0ad945',
'javelin-tokenizer' => '7644823e',
'javelin-typeahead' => '70baed2f',
@@ -1244,6 +1244,12 @@
'javelin-dom',
'javelin-fx',
),
+ '65a65098' => array(
+ 'javelin-install',
+ 'javelin-dom',
+ 'javelin-stratcom',
+ 'javelin-vector',
+ ),
'6882e80a' => array(
'javelin-dom',
),
@@ -1845,12 +1851,6 @@
'javelin-behavior-device',
'phabricator-keyboard-shortcut',
),
- 'e8e4c640' => array(
- 'javelin-install',
- 'javelin-dom',
- 'javelin-stratcom',
- 'javelin-vector',
- ),
'e9581f08' => array(
'javelin-behavior',
'javelin-stratcom',
diff --git a/webroot/rsrc/externals/javelin/lib/Scrollbar.js b/webroot/rsrc/externals/javelin/lib/Scrollbar.js
--- a/webroot/rsrc/externals/javelin/lib/Scrollbar.js
+++ b/webroot/rsrc/externals/javelin/lib/Scrollbar.js
@@ -127,6 +127,7 @@
_timeout: null,
_dragOrigin: null,
+ _scrollOrigin: null,
/**
@@ -181,7 +182,12 @@
*/
_ondrag: function(e) {
e.kill();
+
+ // Store the position where the drag started.
this._dragOrigin = JX.$V(e).y;
+
+ // Store the original position of the handle.
+ this._scrollOrigin = this._viewport.scrollTop;
},
@@ -195,9 +201,9 @@
var offset = (JX.$V(e).y - this._dragOrigin);
var ratio = offset / JX.Vector.getDim(this._bar).y;
- var target = ratio * JX.Vector.getDim(this._content).y;
+ var adjust = ratio * JX.Vector.getDim(this._content).y;
- this._viewport.scrollTop = target;
+ this._viewport.scrollTop = this._scrollOrigin + adjust;
},

File Metadata

Mime Type
text/plain
Expires
Fri, Oct 25, 7:24 AM (3 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710311
Default Alt Text
D11483.diff (2 KB)

Event Timeline