perfect-scrollbar-rails 0.6.10 → 0.6.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e5ce5229e248aa1e4a6cd4b65f81fc4f6b5c118
4
- data.tar.gz: 1e2ab74e7464a5688d07aa8bf9b6295b6517cbda
3
+ metadata.gz: e677c5940a6525915079cc912e854b0a70970a57
4
+ data.tar.gz: 8420d99bc40abbe20fe93313ae262ebd32685bb7
5
5
  SHA512:
6
- metadata.gz: 2e72c867fd0d8cbc6ec32b61e2a3b42e9db0731da0b19c55aa47c0da83099ad015c2d60e896d1cef148bafa740e22b6cdf40ea24abd2afd57c3d99c5794fd47f
7
- data.tar.gz: 8c286701fc6d4390b65c10357251825f1be80b3fec26cd44e1c72ece13854df95731e108e5b1e3b70c37833509d5e25a34867d685e2cee7f019c654fa5a66ee7
6
+ metadata.gz: 164c232f28a1944cb34941545dbbd5c0d642cc20c1dfae0917b375fa1fbff91dd2dcd30f26ff226d39592f0453702eea22daa392fb6f24dd83776523ca2aaeb9
7
+ data.tar.gz: eeb2ca8b6c5bb90adaeab430b9779e43982cf532d3d6da5de42f915b4d31e3d84be94a5ccae1b90cfdf93f9c98a580bcf8b1af4cbb23b7ee51a629fd60d0c51b
data/Dockerfile CHANGED
@@ -5,28 +5,30 @@
5
5
 
6
6
  # ~~~~ Image base ~~~~
7
7
  # Base image with the latest Ruby only
8
- FROM ruby:2.3.0
8
+ FROM ruby:2.3.0-slim
9
9
  MAINTAINER Guillaume Hain zedtux@zedroot.org
10
10
 
11
11
 
12
12
  # ~~~~ Set up the environment ~~~~
13
13
  ENV DEBIAN_FRONTEND noninteractive
14
14
 
15
- # ~~~~ OS Maintenance ~~~~
16
- RUN apt-get update && apt-get install -y unzip
15
+ RUN mkdir -p /gem/
16
+ WORKDIR /gem/
17
+ ADD . /gem/
17
18
 
18
- # ~~~~ Rails Preparation ~~~~
19
+ # ~~~~ OS Maintenance & Rails Preparation ~~~~
19
20
  # Rubygems and Bundler
20
- RUN touch ~/.gemrc && \
21
+ RUN apt-get update && \
22
+ apt-get install -y git build-essential unzip && \
23
+ touch ~/.gemrc && \
21
24
  echo "gem: --no-ri --no-rdoc" >> ~/.gemrc && \
22
25
  gem install rubygems-update && \
23
26
  update_rubygems && \
24
27
  gem install bundler && \
25
- mkdir -p /gem/
26
-
27
- WORKDIR /gem/
28
- ADD . /gem/
29
- RUN bundle install
28
+ bundle install && \
29
+ apt-get remove --purge -y build-essential && \
30
+ apt-get autoclean -y && \
31
+ apt-get clean
30
32
 
31
33
  # Import the gem source code
32
34
  VOLUME .:/gem/
@@ -1,5 +1,5 @@
1
1
  module PerfectScrollbar
2
2
  module Rails
3
- VERSION = '0.6.10'
3
+ VERSION = '0.6.11'
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
- /* perfect-scrollbar v0.6.10 */
1
+ /* perfect-scrollbar v0.6.11 */
2
2
  (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
3
3
  'use strict';
4
4
 
5
- var ps = require('../main')
6
- , psInstances = require('../plugin/instances');
5
+ var ps = require('../main');
6
+ var psInstances = require('../plugin/instances');
7
7
 
8
8
  function mountJQuery(jQuery) {
9
9
  jQuery.fn.perfectScrollbar = function (settingOrCommand) {
@@ -26,8 +26,6 @@ function mountJQuery(jQuery) {
26
26
  ps.destroy(this);
27
27
  }
28
28
  }
29
-
30
- return jQuery(this);
31
29
  });
32
30
  };
33
31
  }
@@ -265,20 +263,22 @@ module.exports = (function () {
265
263
  },{}],6:[function(require,module,exports){
266
264
  'use strict';
267
265
 
268
- var cls = require('./class')
269
- , d = require('./dom');
266
+ var cls = require('./class');
267
+ var dom = require('./dom');
270
268
 
271
- exports.toInt = function (x) {
269
+ var toInt = exports.toInt = function (x) {
272
270
  return parseInt(x, 10) || 0;
273
271
  };
274
272
 
275
- exports.clone = function (obj) {
273
+ var clone = exports.clone = function (obj) {
276
274
  if (obj === null) {
277
275
  return null;
276
+ } else if (obj.constructor === Array) {
277
+ return obj.map(clone);
278
278
  } else if (typeof obj === 'object') {
279
279
  var result = {};
280
280
  for (var key in obj) {
281
- result[key] = this.clone(obj[key]);
281
+ result[key] = clone(obj[key]);
282
282
  }
283
283
  return result;
284
284
  } else {
@@ -287,18 +287,18 @@ exports.clone = function (obj) {
287
287
  };
288
288
 
289
289
  exports.extend = function (original, source) {
290
- var result = this.clone(original);
290
+ var result = clone(original);
291
291
  for (var key in source) {
292
- result[key] = this.clone(source[key]);
292
+ result[key] = clone(source[key]);
293
293
  }
294
294
  return result;
295
295
  };
296
296
 
297
297
  exports.isEditable = function (el) {
298
- return d.matches(el, "input,[contenteditable]") ||
299
- d.matches(el, "select,[contenteditable]") ||
300
- d.matches(el, "textarea,[contenteditable]") ||
301
- d.matches(el, "button,[contenteditable]");
298
+ return dom.matches(el, "input,[contenteditable]") ||
299
+ dom.matches(el, "select,[contenteditable]") ||
300
+ dom.matches(el, "textarea,[contenteditable]") ||
301
+ dom.matches(el, "button,[contenteditable]");
302
302
  };
303
303
 
304
304
  exports.removePsClasses = function (element) {
@@ -312,11 +312,11 @@ exports.removePsClasses = function (element) {
312
312
  };
313
313
 
314
314
  exports.outerWidth = function (element) {
315
- return this.toInt(d.css(element, 'width')) +
316
- this.toInt(d.css(element, 'paddingLeft')) +
317
- this.toInt(d.css(element, 'paddingRight')) +
318
- this.toInt(d.css(element, 'borderLeftWidth')) +
319
- this.toInt(d.css(element, 'borderRightWidth'));
315
+ return toInt(dom.css(element, 'width')) +
316
+ toInt(dom.css(element, 'paddingLeft')) +
317
+ toInt(dom.css(element, 'paddingRight')) +
318
+ toInt(dom.css(element, 'borderLeftWidth')) +
319
+ toInt(dom.css(element, 'borderRightWidth'));
320
320
  };
321
321
 
322
322
  exports.startScrolling = function (element, axis) {
@@ -348,9 +348,9 @@ exports.env = {
348
348
  },{"./class":2,"./dom":3}],7:[function(require,module,exports){
349
349
  'use strict';
350
350
 
351
- var destroy = require('./plugin/destroy')
352
- , initialize = require('./plugin/initialize')
353
- , update = require('./plugin/update');
351
+ var destroy = require('./plugin/destroy');
352
+ var initialize = require('./plugin/initialize');
353
+ var update = require('./plugin/update');
354
354
 
355
355
  module.exports = {
356
356
  initialize: initialize,
@@ -362,6 +362,7 @@ module.exports = {
362
362
  'use strict';
363
363
 
364
364
  module.exports = {
365
+ handlers: ['click-rail', 'drag-scrollbar', 'keyboard', 'wheel', 'touch'],
365
366
  maxScrollbarLength: null,
366
367
  minScrollbarLength: null,
367
368
  scrollXMarginOffset: 0,
@@ -371,8 +372,6 @@ module.exports = {
371
372
  suppressScrollY: false,
372
373
  swipePropagation: true,
373
374
  useBothWheelAxes: false,
374
- useKeyboard: true,
375
- useSelectionScroll: false,
376
375
  wheelPropagation: false,
377
376
  wheelSpeed: 1,
378
377
  theme: 'default'
@@ -381,9 +380,9 @@ module.exports = {
381
380
  },{}],9:[function(require,module,exports){
382
381
  'use strict';
383
382
 
384
- var d = require('../lib/dom')
385
- , h = require('../lib/helper')
386
- , instances = require('./instances');
383
+ var _ = require('../lib/helper');
384
+ var dom = require('../lib/dom');
385
+ var instances = require('./instances');
387
386
 
388
387
  module.exports = function (element) {
389
388
  var i = instances.get(element);
@@ -393,11 +392,11 @@ module.exports = function (element) {
393
392
  }
394
393
 
395
394
  i.event.unbindAll();
396
- d.remove(i.scrollbarX);
397
- d.remove(i.scrollbarY);
398
- d.remove(i.scrollbarXRail);
399
- d.remove(i.scrollbarYRail);
400
- h.removePsClasses(element);
395
+ dom.remove(i.scrollbarX);
396
+ dom.remove(i.scrollbarY);
397
+ dom.remove(i.scrollbarXRail);
398
+ dom.remove(i.scrollbarYRail);
399
+ _.removePsClasses(element);
401
400
 
402
401
  instances.remove(element);
403
402
  };
@@ -405,22 +404,22 @@ module.exports = function (element) {
405
404
  },{"../lib/dom":3,"../lib/helper":6,"./instances":18}],10:[function(require,module,exports){
406
405
  'use strict';
407
406
 
408
- var h = require('../../lib/helper')
409
- , instances = require('../instances')
410
- , updateGeometry = require('../update-geometry')
411
- , updateScroll = require('../update-scroll');
407
+ var _ = require('../../lib/helper');
408
+ var instances = require('../instances');
409
+ var updateGeometry = require('../update-geometry');
410
+ var updateScroll = require('../update-scroll');
412
411
 
413
412
  function bindClickRailHandler(element, i) {
414
413
  function pageOffset(el) {
415
414
  return el.getBoundingClientRect();
416
415
  }
417
- var stopPropagation = window.Event.prototype.stopPropagation.bind;
416
+ var stopPropagation = function (e) { e.stopPropagation(); };
418
417
 
419
418
  if (i.settings.stopPropagationOnClick) {
420
419
  i.event.bind(i.scrollbarY, 'click', stopPropagation);
421
420
  }
422
421
  i.event.bind(i.scrollbarYRail, 'click', function (e) {
423
- var halfOfScrollbarLength = h.toInt(i.scrollbarYHeight / 2);
422
+ var halfOfScrollbarLength = _.toInt(i.scrollbarYHeight / 2);
424
423
  var positionTop = i.railYRatio * (e.pageY - window.pageYOffset - pageOffset(i.scrollbarYRail).top - halfOfScrollbarLength);
425
424
  var maxPositionTop = i.railYRatio * (i.railYHeight - i.scrollbarYHeight);
426
425
  var positionRatio = positionTop / maxPositionTop;
@@ -441,7 +440,7 @@ function bindClickRailHandler(element, i) {
441
440
  i.event.bind(i.scrollbarX, 'click', stopPropagation);
442
441
  }
443
442
  i.event.bind(i.scrollbarXRail, 'click', function (e) {
444
- var halfOfScrollbarLength = h.toInt(i.scrollbarXWidth / 2);
443
+ var halfOfScrollbarLength = _.toInt(i.scrollbarXWidth / 2);
445
444
  var positionLeft = i.railXRatio * (e.pageX - window.pageXOffset - pageOffset(i.scrollbarXRail).left - halfOfScrollbarLength);
446
445
  var maxPositionLeft = i.railXRatio * (i.railXWidth - i.scrollbarXWidth);
447
446
  var positionRatio = positionLeft / maxPositionLeft;
@@ -467,11 +466,11 @@ module.exports = function (element) {
467
466
  },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],11:[function(require,module,exports){
468
467
  'use strict';
469
468
 
470
- var d = require('../../lib/dom')
471
- , h = require('../../lib/helper')
472
- , instances = require('../instances')
473
- , updateGeometry = require('../update-geometry')
474
- , updateScroll = require('../update-scroll');
469
+ var _ = require('../../lib/helper');
470
+ var dom = require('../../lib/dom');
471
+ var instances = require('../instances');
472
+ var updateGeometry = require('../update-geometry');
473
+ var updateScroll = require('../update-scroll');
475
474
 
476
475
  function bindMouseScrollXHandler(element, i) {
477
476
  var currentLeft = null;
@@ -489,7 +488,7 @@ function bindMouseScrollXHandler(element, i) {
489
488
  i.scrollbarXLeft = newLeft;
490
489
  }
491
490
 
492
- var scrollLeft = h.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;
491
+ var scrollLeft = _.toInt(i.scrollbarXLeft * (i.contentWidth - i.containerWidth) / (i.containerWidth - (i.railXRatio * i.scrollbarXWidth))) - i.negativeScrollAdjustment;
493
492
  updateScroll(element, 'left', scrollLeft);
494
493
  }
495
494
 
@@ -501,14 +500,14 @@ function bindMouseScrollXHandler(element, i) {
501
500
  };
502
501
 
503
502
  var mouseUpHandler = function () {
504
- h.stopScrolling(element, 'x');
503
+ _.stopScrolling(element, 'x');
505
504
  i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
506
505
  };
507
506
 
508
507
  i.event.bind(i.scrollbarX, 'mousedown', function (e) {
509
508
  currentPageX = e.pageX;
510
- currentLeft = h.toInt(d.css(i.scrollbarX, 'left')) * i.railXRatio;
511
- h.startScrolling(element, 'x');
509
+ currentLeft = _.toInt(dom.css(i.scrollbarX, 'left')) * i.railXRatio;
510
+ _.startScrolling(element, 'x');
512
511
 
513
512
  i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
514
513
  i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
@@ -534,7 +533,7 @@ function bindMouseScrollYHandler(element, i) {
534
533
  i.scrollbarYTop = newTop;
535
534
  }
536
535
 
537
- var scrollTop = h.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));
536
+ var scrollTop = _.toInt(i.scrollbarYTop * (i.contentHeight - i.containerHeight) / (i.containerHeight - (i.railYRatio * i.scrollbarYHeight)));
538
537
  updateScroll(element, 'top', scrollTop);
539
538
  }
540
539
 
@@ -546,14 +545,14 @@ function bindMouseScrollYHandler(element, i) {
546
545
  };
547
546
 
548
547
  var mouseUpHandler = function () {
549
- h.stopScrolling(element, 'y');
548
+ _.stopScrolling(element, 'y');
550
549
  i.event.unbind(i.ownerDocument, 'mousemove', mouseMoveHandler);
551
550
  };
552
551
 
553
552
  i.event.bind(i.scrollbarY, 'mousedown', function (e) {
554
553
  currentPageY = e.pageY;
555
- currentTop = h.toInt(d.css(i.scrollbarY, 'top')) * i.railYRatio;
556
- h.startScrolling(element, 'y');
554
+ currentTop = _.toInt(dom.css(i.scrollbarY, 'top')) * i.railYRatio;
555
+ _.startScrolling(element, 'y');
557
556
 
558
557
  i.event.bind(i.ownerDocument, 'mousemove', mouseMoveHandler);
559
558
  i.event.once(i.ownerDocument, 'mouseup', mouseUpHandler);
@@ -572,11 +571,11 @@ module.exports = function (element) {
572
571
  },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],12:[function(require,module,exports){
573
572
  'use strict';
574
573
 
575
- var h = require('../../lib/helper')
576
- , d = require('../../lib/dom')
577
- , instances = require('../instances')
578
- , updateGeometry = require('../update-geometry')
579
- , updateScroll = require('../update-scroll');
574
+ var _ = require('../../lib/helper');
575
+ var dom = require('../../lib/dom');
576
+ var instances = require('../instances');
577
+ var updateGeometry = require('../update-geometry');
578
+ var updateScroll = require('../update-scroll');
580
579
 
581
580
  function bindKeyboardHandler(element, i) {
582
581
  var hovered = false;
@@ -616,8 +615,8 @@ function bindKeyboardHandler(element, i) {
616
615
  return;
617
616
  }
618
617
 
619
- var focused = d.matches(i.scrollbarX, ':focus') ||
620
- d.matches(i.scrollbarY, ':focus');
618
+ var focused = dom.matches(i.scrollbarX, ':focus') ||
619
+ dom.matches(i.scrollbarY, ':focus');
621
620
 
622
621
  if (!hovered && !focused) {
623
622
  return;
@@ -625,11 +624,15 @@ function bindKeyboardHandler(element, i) {
625
624
 
626
625
  var activeElement = document.activeElement ? document.activeElement : i.ownerDocument.activeElement;
627
626
  if (activeElement) {
628
- // go deeper if element is a webcomponent
629
- while (activeElement.shadowRoot) {
630
- activeElement = activeElement.shadowRoot.activeElement;
627
+ if (activeElement.tagName === 'IFRAME') {
628
+ activeElement = activeElement.contentDocument.activeElement;
629
+ } else {
630
+ // go deeper if element is a webcomponent
631
+ while (activeElement.shadowRoot) {
632
+ activeElement = activeElement.shadowRoot.activeElement;
633
+ }
631
634
  }
632
- if (h.isEditable(activeElement)) {
635
+ if (_.isEditable(activeElement)) {
633
636
  return;
634
637
  }
635
638
  }
@@ -700,9 +703,9 @@ module.exports = function (element) {
700
703
  },{"../../lib/dom":3,"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],13:[function(require,module,exports){
701
704
  'use strict';
702
705
 
703
- var instances = require('../instances')
704
- , updateGeometry = require('../update-geometry')
705
- , updateScroll = require('../update-scroll');
706
+ var instances = require('../instances');
707
+ var updateGeometry = require('../update-geometry');
708
+ var updateScroll = require('../update-scroll');
706
709
 
707
710
  function bindMouseWheelHandler(element, i) {
708
711
  var shouldPrevent = false;
@@ -755,20 +758,22 @@ function bindMouseWheelHandler(element, i) {
755
758
  return [deltaX, deltaY];
756
759
  }
757
760
 
758
- function shouldBeConsumedByTextarea(deltaX, deltaY) {
759
- var hoveredTextarea = element.querySelector('textarea:hover');
760
- if (hoveredTextarea) {
761
- var maxScrollTop = hoveredTextarea.scrollHeight - hoveredTextarea.clientHeight;
761
+ function shouldBeConsumedByChild(deltaX, deltaY) {
762
+ var child = element.querySelector('textarea:hover, .ps-child:hover');
763
+ if (child) {
764
+ if (child.tagName !== 'TEXTAREA' && !window.getComputedStyle(child).overflow.match(/(scroll|auto)/)) {
765
+ return false;
766
+ }
767
+
768
+ var maxScrollTop = child.scrollHeight - child.clientHeight;
762
769
  if (maxScrollTop > 0) {
763
- if (!(hoveredTextarea.scrollTop === 0 && deltaY > 0) &&
764
- !(hoveredTextarea.scrollTop === maxScrollTop && deltaY < 0)) {
770
+ if (!(child.scrollTop === 0 && deltaY > 0) && !(child.scrollTop === maxScrollTop && deltaY < 0)) {
765
771
  return true;
766
772
  }
767
773
  }
768
- var maxScrollLeft = hoveredTextarea.scrollLeft - hoveredTextarea.clientWidth;
774
+ var maxScrollLeft = child.scrollLeft - child.clientWidth;
769
775
  if (maxScrollLeft > 0) {
770
- if (!(hoveredTextarea.scrollLeft === 0 && deltaX < 0) &&
771
- !(hoveredTextarea.scrollLeft === maxScrollLeft && deltaX > 0)) {
776
+ if (!(child.scrollLeft === 0 && deltaX < 0) && !(child.scrollLeft === maxScrollLeft && deltaX > 0)) {
772
777
  return true;
773
778
  }
774
779
  }
@@ -782,7 +787,7 @@ function bindMouseWheelHandler(element, i) {
782
787
  var deltaX = delta[0];
783
788
  var deltaY = delta[1];
784
789
 
785
- if (shouldBeConsumedByTextarea(deltaX, deltaY)) {
790
+ if (shouldBeConsumedByChild(deltaX, deltaY)) {
786
791
  return;
787
792
  }
788
793
 
@@ -836,8 +841,8 @@ module.exports = function (element) {
836
841
  },{"../instances":18,"../update-geometry":19,"../update-scroll":20}],14:[function(require,module,exports){
837
842
  'use strict';
838
843
 
839
- var instances = require('../instances')
840
- , updateGeometry = require('../update-geometry');
844
+ var instances = require('../instances');
845
+ var updateGeometry = require('../update-geometry');
841
846
 
842
847
  function bindNativeScrollHandler(element, i) {
843
848
  i.event.bind(element, 'scroll', function () {
@@ -853,10 +858,10 @@ module.exports = function (element) {
853
858
  },{"../instances":18,"../update-geometry":19}],15:[function(require,module,exports){
854
859
  'use strict';
855
860
 
856
- var h = require('../../lib/helper')
857
- , instances = require('../instances')
858
- , updateGeometry = require('../update-geometry')
859
- , updateScroll = require('../update-scroll');
861
+ var _ = require('../../lib/helper');
862
+ var instances = require('../instances');
863
+ var updateGeometry = require('../update-geometry');
864
+ var updateScroll = require('../update-scroll');
860
865
 
861
866
  function bindSelectionHandler(element, i) {
862
867
  function getRangeNode() {
@@ -890,7 +895,7 @@ function bindSelectionHandler(element, i) {
890
895
  clearInterval(scrollingLoop);
891
896
  scrollingLoop = null;
892
897
  }
893
- h.stopScrolling(element);
898
+ _.stopScrolling(element);
894
899
  }
895
900
 
896
901
  var isSelected = false;
@@ -921,10 +926,10 @@ function bindSelectionHandler(element, i) {
921
926
 
922
927
  if (mousePosition.x < containerGeometry.left + 3) {
923
928
  scrollDiff.left = -5;
924
- h.startScrolling(element, 'x');
929
+ _.startScrolling(element, 'x');
925
930
  } else if (mousePosition.x > containerGeometry.right - 3) {
926
931
  scrollDiff.left = 5;
927
- h.startScrolling(element, 'x');
932
+ _.startScrolling(element, 'x');
928
933
  } else {
929
934
  scrollDiff.left = 0;
930
935
  }
@@ -935,14 +940,14 @@ function bindSelectionHandler(element, i) {
935
940
  } else {
936
941
  scrollDiff.top = -20;
937
942
  }
938
- h.startScrolling(element, 'y');
943
+ _.startScrolling(element, 'y');
939
944
  } else if (mousePosition.y > containerGeometry.bottom - 3) {
940
945
  if (mousePosition.y - containerGeometry.bottom + 3 < 5) {
941
946
  scrollDiff.top = 5;
942
947
  } else {
943
948
  scrollDiff.top = 20;
944
949
  }
945
- h.startScrolling(element, 'y');
950
+ _.startScrolling(element, 'y');
946
951
  } else {
947
952
  scrollDiff.top = 0;
948
953
  }
@@ -964,9 +969,10 @@ module.exports = function (element) {
964
969
  },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],16:[function(require,module,exports){
965
970
  'use strict';
966
971
 
967
- var instances = require('../instances')
968
- , updateGeometry = require('../update-geometry')
969
- , updateScroll = require('../update-scroll');
972
+ var _ = require('../../lib/helper');
973
+ var instances = require('../instances');
974
+ var updateGeometry = require('../update-geometry');
975
+ var updateScroll = require('../update-scroll');
970
976
 
971
977
  function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
972
978
  function shouldPreventDefault(deltaX, deltaY) {
@@ -1051,6 +1057,9 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
1051
1057
  }
1052
1058
  }
1053
1059
  function touchMove(e) {
1060
+ if (!inLocalTouch && i.settings.swipePropagation) {
1061
+ touchStart(e);
1062
+ }
1054
1063
  if (!inGlobalTouch && inLocalTouch && shouldHandle(e)) {
1055
1064
  var touch = getTouch(e);
1056
1065
 
@@ -1126,27 +1135,33 @@ function bindTouchHandler(element, i, supportsTouch, supportsIePointer) {
1126
1135
  }
1127
1136
  }
1128
1137
 
1129
- module.exports = function (element, supportsTouch, supportsIePointer) {
1138
+ module.exports = function (element) {
1139
+ if (!_.env.supportsTouch && !_.env.supportsIePointer) {
1140
+ return;
1141
+ }
1142
+
1130
1143
  var i = instances.get(element);
1131
- bindTouchHandler(element, i, supportsTouch, supportsIePointer);
1144
+ bindTouchHandler(element, i, _.env.supportsTouch, _.env.supportsIePointer);
1132
1145
  };
1133
1146
 
1134
- },{"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){
1147
+ },{"../../lib/helper":6,"../instances":18,"../update-geometry":19,"../update-scroll":20}],17:[function(require,module,exports){
1135
1148
  'use strict';
1136
1149
 
1137
- var cls = require('../lib/class')
1138
- , h = require('../lib/helper')
1139
- , instances = require('./instances')
1140
- , updateGeometry = require('./update-geometry');
1150
+ var _ = require('../lib/helper');
1151
+ var cls = require('../lib/class');
1152
+ var instances = require('./instances');
1153
+ var updateGeometry = require('./update-geometry');
1141
1154
 
1142
1155
  // Handlers
1143
- var clickRailHandler = require('./handler/click-rail')
1144
- , dragScrollbarHandler = require('./handler/drag-scrollbar')
1145
- , keyboardHandler = require('./handler/keyboard')
1146
- , mouseWheelHandler = require('./handler/mouse-wheel')
1147
- , nativeScrollHandler = require('./handler/native-scroll')
1148
- , selectionHandler = require('./handler/selection')
1149
- , touchHandler = require('./handler/touch');
1156
+ var handlers = {
1157
+ 'click-rail': require('./handler/click-rail'),
1158
+ 'drag-scrollbar': require('./handler/drag-scrollbar'),
1159
+ 'keyboard': require('./handler/keyboard'),
1160
+ 'wheel': require('./handler/mouse-wheel'),
1161
+ 'touch': require('./handler/touch'),
1162
+ 'selection': require('./handler/selection')
1163
+ };
1164
+ var nativeScrollHandler = require('./handler/native-scroll');
1150
1165
 
1151
1166
  module.exports = function (element, userSettings) {
1152
1167
  userSettings = typeof userSettings === 'object' ? userSettings : {};
@@ -1156,24 +1171,14 @@ module.exports = function (element, userSettings) {
1156
1171
  // Create a plugin instance.
1157
1172
  var i = instances.add(element);
1158
1173
 
1159
- i.settings = h.extend(i.settings, userSettings);
1174
+ i.settings = _.extend(i.settings, userSettings);
1160
1175
  cls.add(element, 'ps-theme-' + i.settings.theme);
1161
1176
 
1162
- clickRailHandler(element);
1163
- dragScrollbarHandler(element);
1164
- mouseWheelHandler(element);
1165
- nativeScrollHandler(element);
1166
-
1167
- if (i.settings.useSelectionScroll) {
1168
- selectionHandler(element);
1169
- }
1177
+ i.settings.handlers.forEach(function (handlerName) {
1178
+ handlers[handlerName](element);
1179
+ });
1170
1180
 
1171
- if (h.env.supportsTouch || h.env.supportsIePointer) {
1172
- touchHandler(element, h.env.supportsTouch, h.env.supportsIePointer);
1173
- }
1174
- if (i.settings.useKeyboard) {
1175
- keyboardHandler(element);
1176
- }
1181
+ nativeScrollHandler(element);
1177
1182
 
1178
1183
  updateGeometry(element);
1179
1184
  };
@@ -1181,25 +1186,25 @@ module.exports = function (element, userSettings) {
1181
1186
  },{"../lib/class":2,"../lib/helper":6,"./handler/click-rail":10,"./handler/drag-scrollbar":11,"./handler/keyboard":12,"./handler/mouse-wheel":13,"./handler/native-scroll":14,"./handler/selection":15,"./handler/touch":16,"./instances":18,"./update-geometry":19}],18:[function(require,module,exports){
1182
1187
  'use strict';
1183
1188
 
1184
- var cls = require('../lib/class')
1185
- , d = require('../lib/dom')
1186
- , defaultSettings = require('./default-setting')
1187
- , EventManager = require('../lib/event-manager')
1188
- , guid = require('../lib/guid')
1189
- , h = require('../lib/helper');
1189
+ var _ = require('../lib/helper');
1190
+ var cls = require('../lib/class');
1191
+ var defaultSettings = require('./default-setting');
1192
+ var dom = require('../lib/dom');
1193
+ var EventManager = require('../lib/event-manager');
1194
+ var guid = require('../lib/guid');
1190
1195
 
1191
1196
  var instances = {};
1192
1197
 
1193
1198
  function Instance(element) {
1194
1199
  var i = this;
1195
1200
 
1196
- i.settings = h.clone(defaultSettings);
1201
+ i.settings = _.clone(defaultSettings);
1197
1202
  i.containerWidth = null;
1198
1203
  i.containerHeight = null;
1199
1204
  i.contentWidth = null;
1200
1205
  i.contentHeight = null;
1201
1206
 
1202
- i.isRtl = d.css(element, 'direction') === "rtl";
1207
+ i.isRtl = dom.css(element, 'direction') === "rtl";
1203
1208
  i.isNegativeScroll = (function () {
1204
1209
  var originalScrollLeft = element.scrollLeft;
1205
1210
  var result = null;
@@ -1220,67 +1225,55 @@ function Instance(element) {
1220
1225
  cls.remove(element, 'ps-focus');
1221
1226
  }
1222
1227
 
1223
- i.scrollbarXRail = d.appendTo(d.e('div', 'ps-scrollbar-x-rail'), element);
1224
- i.scrollbarX = d.appendTo(d.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);
1228
+ i.scrollbarXRail = dom.appendTo(dom.e('div', 'ps-scrollbar-x-rail'), element);
1229
+ i.scrollbarX = dom.appendTo(dom.e('div', 'ps-scrollbar-x'), i.scrollbarXRail);
1225
1230
  i.scrollbarX.setAttribute('tabindex', 0);
1226
1231
  i.event.bind(i.scrollbarX, 'focus', focus);
1227
1232
  i.event.bind(i.scrollbarX, 'blur', blur);
1228
1233
  i.scrollbarXActive = null;
1229
1234
  i.scrollbarXWidth = null;
1230
1235
  i.scrollbarXLeft = null;
1231
- i.scrollbarXBottom = h.toInt(d.css(i.scrollbarXRail, 'bottom'));
1236
+ i.scrollbarXBottom = _.toInt(dom.css(i.scrollbarXRail, 'bottom'));
1232
1237
  i.isScrollbarXUsingBottom = i.scrollbarXBottom === i.scrollbarXBottom; // !isNaN
1233
- i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : h.toInt(d.css(i.scrollbarXRail, 'top'));
1234
- i.railBorderXWidth = h.toInt(d.css(i.scrollbarXRail, 'borderLeftWidth')) + h.toInt(d.css(i.scrollbarXRail, 'borderRightWidth'));
1238
+ i.scrollbarXTop = i.isScrollbarXUsingBottom ? null : _.toInt(dom.css(i.scrollbarXRail, 'top'));
1239
+ i.railBorderXWidth = _.toInt(dom.css(i.scrollbarXRail, 'borderLeftWidth')) + _.toInt(dom.css(i.scrollbarXRail, 'borderRightWidth'));
1235
1240
  // Set rail to display:block to calculate margins
1236
- d.css(i.scrollbarXRail, 'display', 'block');
1237
- i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));
1238
- d.css(i.scrollbarXRail, 'display', '');
1241
+ dom.css(i.scrollbarXRail, 'display', 'block');
1242
+ i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
1243
+ dom.css(i.scrollbarXRail, 'display', '');
1239
1244
  i.railXWidth = null;
1240
1245
  i.railXRatio = null;
1241
1246
 
1242
- i.scrollbarYRail = d.appendTo(d.e('div', 'ps-scrollbar-y-rail'), element);
1243
- i.scrollbarY = d.appendTo(d.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);
1247
+ i.scrollbarYRail = dom.appendTo(dom.e('div', 'ps-scrollbar-y-rail'), element);
1248
+ i.scrollbarY = dom.appendTo(dom.e('div', 'ps-scrollbar-y'), i.scrollbarYRail);
1244
1249
  i.scrollbarY.setAttribute('tabindex', 0);
1245
1250
  i.event.bind(i.scrollbarY, 'focus', focus);
1246
1251
  i.event.bind(i.scrollbarY, 'blur', blur);
1247
1252
  i.scrollbarYActive = null;
1248
1253
  i.scrollbarYHeight = null;
1249
1254
  i.scrollbarYTop = null;
1250
- i.scrollbarYRight = h.toInt(d.css(i.scrollbarYRail, 'right'));
1255
+ i.scrollbarYRight = _.toInt(dom.css(i.scrollbarYRail, 'right'));
1251
1256
  i.isScrollbarYUsingRight = i.scrollbarYRight === i.scrollbarYRight; // !isNaN
1252
- i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : h.toInt(d.css(i.scrollbarYRail, 'left'));
1253
- i.scrollbarYOuterWidth = i.isRtl ? h.outerWidth(i.scrollbarY) : null;
1254
- i.railBorderYWidth = h.toInt(d.css(i.scrollbarYRail, 'borderTopWidth')) + h.toInt(d.css(i.scrollbarYRail, 'borderBottomWidth'));
1255
- d.css(i.scrollbarYRail, 'display', 'block');
1256
- i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));
1257
- d.css(i.scrollbarYRail, 'display', '');
1257
+ i.scrollbarYLeft = i.isScrollbarYUsingRight ? null : _.toInt(dom.css(i.scrollbarYRail, 'left'));
1258
+ i.scrollbarYOuterWidth = i.isRtl ? _.outerWidth(i.scrollbarY) : null;
1259
+ i.railBorderYWidth = _.toInt(dom.css(i.scrollbarYRail, 'borderTopWidth')) + _.toInt(dom.css(i.scrollbarYRail, 'borderBottomWidth'));
1260
+ dom.css(i.scrollbarYRail, 'display', 'block');
1261
+ i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
1262
+ dom.css(i.scrollbarYRail, 'display', '');
1258
1263
  i.railYHeight = null;
1259
1264
  i.railYRatio = null;
1260
1265
  }
1261
1266
 
1262
1267
  function getId(element) {
1263
- if (typeof element.dataset === 'undefined') {
1264
- return element.getAttribute('data-ps-id');
1265
- } else {
1266
- return element.dataset.psId;
1267
- }
1268
+ return element.getAttribute('data-ps-id');
1268
1269
  }
1269
1270
 
1270
1271
  function setId(element, id) {
1271
- if (typeof element.dataset === 'undefined') {
1272
- element.setAttribute('data-ps-id', id);
1273
- } else {
1274
- element.dataset.psId = id;
1275
- }
1272
+ element.setAttribute('data-ps-id', id);
1276
1273
  }
1277
1274
 
1278
1275
  function removeId(element) {
1279
- if (typeof element.dataset === 'undefined') {
1280
- element.removeAttribute('data-ps-id');
1281
- } else {
1282
- delete element.dataset.psId;
1283
- }
1276
+ element.removeAttribute('data-ps-id');
1284
1277
  }
1285
1278
 
1286
1279
  exports.add = function (element) {
@@ -1302,11 +1295,11 @@ exports.get = function (element) {
1302
1295
  },{"../lib/class":2,"../lib/dom":3,"../lib/event-manager":4,"../lib/guid":5,"../lib/helper":6,"./default-setting":8}],19:[function(require,module,exports){
1303
1296
  'use strict';
1304
1297
 
1305
- var cls = require('../lib/class')
1306
- , d = require('../lib/dom')
1307
- , h = require('../lib/helper')
1308
- , instances = require('./instances')
1309
- , updateScroll = require('./update-scroll');
1298
+ var _ = require('../lib/helper');
1299
+ var cls = require('../lib/class');
1300
+ var dom = require('../lib/dom');
1301
+ var instances = require('./instances');
1302
+ var updateScroll = require('./update-scroll');
1310
1303
 
1311
1304
  function getThumbSize(i, thumbSize) {
1312
1305
  if (i.settings.minScrollbarLength) {
@@ -1330,7 +1323,7 @@ function updateCss(element, i) {
1330
1323
  } else {
1331
1324
  xRailOffset.top = i.scrollbarXTop + element.scrollTop;
1332
1325
  }
1333
- d.css(i.scrollbarXRail, xRailOffset);
1326
+ dom.css(i.scrollbarXRail, xRailOffset);
1334
1327
 
1335
1328
  var yRailOffset = {top: element.scrollTop, height: i.railYHeight};
1336
1329
  if (i.isScrollbarYUsingRight) {
@@ -1346,10 +1339,10 @@ function updateCss(element, i) {
1346
1339
  yRailOffset.left = i.scrollbarYLeft + element.scrollLeft;
1347
1340
  }
1348
1341
  }
1349
- d.css(i.scrollbarYRail, yRailOffset);
1342
+ dom.css(i.scrollbarYRail, yRailOffset);
1350
1343
 
1351
- d.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});
1352
- d.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});
1344
+ dom.css(i.scrollbarX, {left: i.scrollbarXLeft, width: i.scrollbarXWidth - i.railBorderXWidth});
1345
+ dom.css(i.scrollbarY, {top: i.scrollbarYTop, height: i.scrollbarYHeight - i.railBorderYWidth});
1353
1346
  }
1354
1347
 
1355
1348
  module.exports = function (element) {
@@ -1362,30 +1355,30 @@ module.exports = function (element) {
1362
1355
 
1363
1356
  var existingRails;
1364
1357
  if (!element.contains(i.scrollbarXRail)) {
1365
- existingRails = d.queryChildren(element, '.ps-scrollbar-x-rail');
1358
+ existingRails = dom.queryChildren(element, '.ps-scrollbar-x-rail');
1366
1359
  if (existingRails.length > 0) {
1367
1360
  existingRails.forEach(function (rail) {
1368
- d.remove(rail);
1361
+ dom.remove(rail);
1369
1362
  });
1370
1363
  }
1371
- d.appendTo(i.scrollbarXRail, element);
1364
+ dom.appendTo(i.scrollbarXRail, element);
1372
1365
  }
1373
1366
  if (!element.contains(i.scrollbarYRail)) {
1374
- existingRails = d.queryChildren(element, '.ps-scrollbar-y-rail');
1367
+ existingRails = dom.queryChildren(element, '.ps-scrollbar-y-rail');
1375
1368
  if (existingRails.length > 0) {
1376
1369
  existingRails.forEach(function (rail) {
1377
- d.remove(rail);
1370
+ dom.remove(rail);
1378
1371
  });
1379
1372
  }
1380
- d.appendTo(i.scrollbarYRail, element);
1373
+ dom.appendTo(i.scrollbarYRail, element);
1381
1374
  }
1382
1375
 
1383
1376
  if (!i.settings.suppressScrollX && i.containerWidth + i.settings.scrollXMarginOffset < i.contentWidth) {
1384
1377
  i.scrollbarXActive = true;
1385
1378
  i.railXWidth = i.containerWidth - i.railXMarginWidth;
1386
1379
  i.railXRatio = i.containerWidth / i.railXWidth;
1387
- i.scrollbarXWidth = getThumbSize(i, h.toInt(i.railXWidth * i.containerWidth / i.contentWidth));
1388
- i.scrollbarXLeft = h.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));
1380
+ i.scrollbarXWidth = getThumbSize(i, _.toInt(i.railXWidth * i.containerWidth / i.contentWidth));
1381
+ i.scrollbarXLeft = _.toInt((i.negativeScrollAdjustment + element.scrollLeft) * (i.railXWidth - i.scrollbarXWidth) / (i.contentWidth - i.containerWidth));
1389
1382
  } else {
1390
1383
  i.scrollbarXActive = false;
1391
1384
  }
@@ -1394,8 +1387,8 @@ module.exports = function (element) {
1394
1387
  i.scrollbarYActive = true;
1395
1388
  i.railYHeight = i.containerHeight - i.railYMarginHeight;
1396
1389
  i.railYRatio = i.containerHeight / i.railYHeight;
1397
- i.scrollbarYHeight = getThumbSize(i, h.toInt(i.railYHeight * i.containerHeight / i.contentHeight));
1398
- i.scrollbarYTop = h.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));
1390
+ i.scrollbarYHeight = getThumbSize(i, _.toInt(i.railYHeight * i.containerHeight / i.contentHeight));
1391
+ i.scrollbarYTop = _.toInt(element.scrollTop * (i.railYHeight - i.scrollbarYHeight) / (i.contentHeight - i.containerHeight));
1399
1392
  } else {
1400
1393
  i.scrollbarYActive = false;
1401
1394
  }
@@ -1432,18 +1425,18 @@ module.exports = function (element) {
1432
1425
 
1433
1426
  var instances = require('./instances');
1434
1427
 
1435
- var upEvent = document.createEvent('Event')
1436
- , downEvent = document.createEvent('Event')
1437
- , leftEvent = document.createEvent('Event')
1438
- , rightEvent = document.createEvent('Event')
1439
- , yEvent = document.createEvent('Event')
1440
- , xEvent = document.createEvent('Event')
1441
- , xStartEvent = document.createEvent('Event')
1442
- , xEndEvent = document.createEvent('Event')
1443
- , yStartEvent = document.createEvent('Event')
1444
- , yEndEvent = document.createEvent('Event')
1445
- , lastTop
1446
- , lastLeft;
1428
+ var upEvent = document.createEvent('Event');
1429
+ var downEvent = document.createEvent('Event');
1430
+ var leftEvent = document.createEvent('Event');
1431
+ var rightEvent = document.createEvent('Event');
1432
+ var yEvent = document.createEvent('Event');
1433
+ var xEvent = document.createEvent('Event');
1434
+ var xStartEvent = document.createEvent('Event');
1435
+ var xEndEvent = document.createEvent('Event');
1436
+ var yStartEvent = document.createEvent('Event');
1437
+ var yEndEvent = document.createEvent('Event');
1438
+ var lastTop;
1439
+ var lastLeft;
1447
1440
 
1448
1441
  upEvent.initEvent('ps-scroll-up', true, true);
1449
1442
  downEvent.initEvent('ps-scroll-down', true, true);
@@ -1482,12 +1475,26 @@ module.exports = function (element, axis, value) {
1482
1475
  var i = instances.get(element);
1483
1476
 
1484
1477
  if (axis === 'top' && value >= i.contentHeight - i.containerHeight) {
1485
- element.scrollTop = value = i.contentHeight - i.containerHeight; // don't allow scroll past container
1478
+ // don't allow scroll past container
1479
+ value = i.contentHeight - i.containerHeight;
1480
+ if (value - element.scrollTop <= 1) {
1481
+ // mitigates rounding errors on non-subpixel scroll values
1482
+ value = element.scrollTop;
1483
+ } else {
1484
+ element.scrollTop = value;
1485
+ }
1486
1486
  element.dispatchEvent(yEndEvent);
1487
1487
  }
1488
1488
 
1489
1489
  if (axis === 'left' && value >= i.contentWidth - i.containerWidth) {
1490
- element.scrollLeft = value = i.contentWidth - i.containerWidth; // don't allow scroll past container
1490
+ // don't allow scroll past container
1491
+ value = i.contentWidth - i.containerWidth;
1492
+ if (value - element.scrollLeft <= 1) {
1493
+ // mitigates rounding errors on non-subpixel scroll values
1494
+ value = element.scrollLeft;
1495
+ } else {
1496
+ element.scrollLeft = value;
1497
+ }
1491
1498
  element.dispatchEvent(xEndEvent);
1492
1499
  }
1493
1500
 
@@ -1530,11 +1537,11 @@ module.exports = function (element, axis, value) {
1530
1537
  },{"./instances":18}],21:[function(require,module,exports){
1531
1538
  'use strict';
1532
1539
 
1533
- var d = require('../lib/dom')
1534
- , h = require('../lib/helper')
1535
- , instances = require('./instances')
1536
- , updateGeometry = require('./update-geometry')
1537
- , updateScroll = require('./update-scroll');
1540
+ var _ = require('../lib/helper');
1541
+ var dom = require('../lib/dom');
1542
+ var instances = require('./instances');
1543
+ var updateGeometry = require('./update-geometry');
1544
+ var updateScroll = require('./update-scroll');
1538
1545
 
1539
1546
  module.exports = function (element) {
1540
1547
  var i = instances.get(element);
@@ -1547,14 +1554,14 @@ module.exports = function (element) {
1547
1554
  i.negativeScrollAdjustment = i.isNegativeScroll ? element.scrollWidth - element.clientWidth : 0;
1548
1555
 
1549
1556
  // Recalculate rail margins
1550
- d.css(i.scrollbarXRail, 'display', 'block');
1551
- d.css(i.scrollbarYRail, 'display', 'block');
1552
- i.railXMarginWidth = h.toInt(d.css(i.scrollbarXRail, 'marginLeft')) + h.toInt(d.css(i.scrollbarXRail, 'marginRight'));
1553
- i.railYMarginHeight = h.toInt(d.css(i.scrollbarYRail, 'marginTop')) + h.toInt(d.css(i.scrollbarYRail, 'marginBottom'));
1557
+ dom.css(i.scrollbarXRail, 'display', 'block');
1558
+ dom.css(i.scrollbarYRail, 'display', 'block');
1559
+ i.railXMarginWidth = _.toInt(dom.css(i.scrollbarXRail, 'marginLeft')) + _.toInt(dom.css(i.scrollbarXRail, 'marginRight'));
1560
+ i.railYMarginHeight = _.toInt(dom.css(i.scrollbarYRail, 'marginTop')) + _.toInt(dom.css(i.scrollbarYRail, 'marginBottom'));
1554
1561
 
1555
1562
  // Hide scrollbars not to affect scrollWidth and scrollHeight
1556
- d.css(i.scrollbarXRail, 'display', 'none');
1557
- d.css(i.scrollbarYRail, 'display', 'none');
1563
+ dom.css(i.scrollbarXRail, 'display', 'none');
1564
+ dom.css(i.scrollbarYRail, 'display', 'none');
1558
1565
 
1559
1566
  updateGeometry(element);
1560
1567
 
@@ -1562,8 +1569,8 @@ module.exports = function (element) {
1562
1569
  updateScroll(element, 'top', element.scrollTop);
1563
1570
  updateScroll(element, 'left', element.scrollLeft);
1564
1571
 
1565
- d.css(i.scrollbarXRail, 'display', '');
1566
- d.css(i.scrollbarYRail, 'display', '');
1572
+ dom.css(i.scrollbarXRail, 'display', '');
1573
+ dom.css(i.scrollbarYRail, 'display', '');
1567
1574
  };
1568
1575
 
1569
1576
  },{"../lib/dom":3,"../lib/helper":6,"./instances":18,"./update-geometry":19,"./update-scroll":20}]},{},[1]);
@@ -1,4 +1,4 @@
1
- /* perfect-scrollbar v0.6.10 */
1
+ /* perfect-scrollbar v0.6.11 */
2
2
  .ps-container {
3
3
  -ms-touch-action: none;
4
4
  touch-action: none;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfect-scrollbar-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.10
4
+ version: 0.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Guillaume Hain
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-01-26 00:00:00.000000000 Z
11
+ date: 2016-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.5.1
100
+ rubygems_version: 2.6.4
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: This Gem integrates noraesae's Jquery perfect-scrollbar with Rails, exposing