Hi! I'm trying to find where to pass the verticalDragMinHeight, verticalDragMaxHeight, horizontalDragMinWidth and horizontalDragMaxWidth arguments, but I can't figure out where they should be.

Could somebody help me? I'm pretty new at drupal and jscrollpane. I've read the documentation and issues, but I couldn't make it out.

Thanks!

Comments

dshields’s picture

If I'm not mistaken, that is all controlled through your theme's CSS.

ithilethiel’s picture

If I change it through CSS, it changes the size, but the scroller never reaches the end of the div.

I know that it can be done by passing those arguments I said in the first post, but I don't know where I've to put them.

http://jscrollpane.kelvinluck.com/drag_size.html

I've tried doing so where the tutorial says, but it didn't work for me

opdavies’s picture

Category: support » feature
nycguyjason’s picture

I came across this old request looking for a solution myself.

Temporary solution:
Until the feature is added to the module, you can add the jscrollpane custom options by editing the module's "script.js" file. (/sites/all/modules/jscrollpane/js.script.js)

To add the Drag size options from the demo page:

Change this:

(function ($) {

  Drupal.behaviors.jScrollPane = {
    attach: function (context, settings) {
      var jScrollPane = Drupal.settings.jScrollPane['class'];
      $(jScrollPane, context).jScrollPane();
    }
  };

})(jQuery);

To this:

(function ($) {

  Drupal.behaviors.jScrollPane = {
    attach: function (context, settings) {
      var jScrollPane = Drupal.settings.jScrollPane['class'];
      $(jScrollPane, context).jScrollPane(
      {
			verticalDragMinHeight: 20,
			verticalDragMaxHeight: 20,
			horizontalDragMinWidth: 20,
			horizontalDragMaxWidth: 20
		}
      );
    }
  };

})(jQuery);