Skip to content

Commit

Permalink
Fix side panel scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
Leeft committed Dec 30, 2015
1 parent 17a2edf commit 9360419
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ System.config({
"imagesloaded": "npm:imagesloaded@3.2.0",
"javascript-state-machine": "npm:javascript-state-machine@2.3.5",
"jquery": "github:components/jquery@2.1.4",
"jquery-mousewheel": "npm:jquery-mousewheel@3.1.12",
"jquery-ui": "github:components/jqueryui@1.11.4",
"jscrollpane": "npm:jscrollpane@2.0.22",
"leeft/three-sprite-texture-atlas-manager": "github:leeft/three-sprite-texture-atlas-manager@0.1.3",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"imagesloaded": "npm:imagesloaded@^3.2.0",
"javascript-state-machine": "npm:javascript-state-machine@^2.3.5",
"jquery": "github:components/jquery@^2.1.4",
"jquery-mousewheel": "npm:jquery-mousewheel@3.1.12",
"jquery-ui": "github:components/jqueryui@^1.11.4",
"jscrollpane": "npm:jscrollpane@^2.0.22",
"leeft/three-sprite-texture-atlas-manager": "github:leeft/three-sprite-texture-atlas-manager@0.1.3",
Expand Down
7 changes: 6 additions & 1 deletion src/scmap/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import $ from 'jquery';

import tabs from 'jquery-ui/ui/tabs';
import slider from 'jquery-ui/ui/slider';
import jqueryMousewheel from 'jquery-mousewheel';
import jscrollpane from 'jscrollpane';
import imagesLoaded from 'imagesloaded';
import resizeListener from 'element-resize-detector';
Expand Down Expand Up @@ -452,10 +453,14 @@ class UI {
map.route().rebuildCurrentRoute();
});

// Init the mousewheel plugin ("import" alone doesn't cut it)
jqueryMousewheel( $ );

/* jScrollPane */
$('#sc-map-interface').jScrollPane({
showArrows: false,
horizontalGutter: 6
horizontalGutter: 6,
mouseWheelSpeed: 4,
});

this.oldWidth = 0;
Expand Down

0 comments on commit 9360419

Please sign in to comment.