Permalink
Browse files

Added positionDragX and positionDragY methods to the API (see vitch#19 )

  • Loading branch information...
1 parent 8daa1dd commit bb209070daea10ac128a397680e21f739bdc11ff @vitch vitch committed Jan 29, 2011
Showing with 27 additions and 1 deletion.
  1. +12 −0 api.html
  2. +14 −0 script/jquery.jscrollpane.js
  3. +1 −1 script/jquery.jscrollpane.min.js
View
@@ -91,6 +91,18 @@ <h2 id="scrollByY">scrollByY(deltaY, animate)</h2>
Scrolls the pane by the specified amount of pixels. animate is optional and if not passed then
the value of animateScroll from the settings object this jScrollPane was initialised with is used.
</p>
+ <h2 id="positionDragX">positionDragX(x, animate)</h2>
+ <p>
+ Positions the horizontal drag at the specified x position (and updates the viewport to reflect
+ this). animate is optional and if not passed then the value of animateScroll from the settings
+ object this jScrollPane was initialised with is used.
+ </p>
+ <h2 id="positionDragY">positionDragY(y, animate)</h2>
+ <p>
+ Positions the vertical drag at the specified y position (and updates the viewport to reflect
+ this). animate is optional and if not passed then the value of animateScroll from the settings
+ object this jScrollPane was initialised with is used.
+ </p>
<h2 id="animate">animate(ele, prop, value, stepCallback)</h2>
<p>
This method is called when jScrollPane is trying to animate to a new position. You can override
@@ -1212,6 +1212,20 @@
percentScrolled = destY / (contentHeight - paneHeight);
positionDragY(percentScrolled * dragMaxY, animate);
},
+ // Positions the horizontal drag at the specified x position (and updates the viewport to reflect
+ // this). animate is optional and if not passed then the value of animateScroll from the settings
+ // object this jScrollPane was initialised with is used.
+ positionDragX: function(x, animate)
+ {
+ positionDragX(x, animate);
+ },
+ // Positions the vertical drag at the specified y position (and updates the viewport to reflect
+ // this). animate is optional and if not passed then the value of animateScroll from the settings
+ // object this jScrollPane was initialised with is used.
+ positionDragY: function(y, animate)
+ {
+ positionDragX(y, animate);
+ },
// This method is called when jScrollPane is trying to animate to a new position. You can override
// it if you want to provide advanced animation functionality. It is passed the following arguments:
// * ele - the element whose position is being animated

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit bb20907

Please sign in to comment.