Browse Source

Allow normal page scrolling over timeline (#3818)

develop
Lewis B 6 years ago
committed by Yotam Berkowitz
parent
commit
c137112bf5
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      lib/timeline/Core.js

+ 4
- 1
lib/timeline/Core.js View File

@ -204,9 +204,12 @@ Core.prototype._create = function (container) {
deltaX = event.deltaX;
}
// prevent scrolling when zoomKey defined or activated
// Prevent scrolling when zooming (no zoom key, or pressing zoom key)
if (!this.options.zoomKey || event[this.options.zoomKey]) return;
// Don't preventDefault if you can't scroll
if (!this.options.verticalScroll && !this.options.horizontalScroll) return;
// Prevent default actions caused by mouse wheel
// (else the page and timeline both scroll)
event.preventDefault();

Loading…
Cancel
Save