Browse Source

fixed vertical dragging issue from hammer (which was found in network) in the timeline

flowchartTest
Alex de Mulder 9 years ago
parent
commit
1a3f63f187
4 changed files with 14529 additions and 14523 deletions
  1. +14526
    -14523
      dist/vis.js
  2. +1
    -0
      lib/timeline/Core.js
  3. +1
    -0
      lib/timeline/component/CustomTime.js
  4. +1
    -0
      lib/timeline/component/ItemSet.js

+ 14526
- 14523
dist/vis.js
File diff suppressed because it is too large
View File


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

@ -115,6 +115,7 @@ Core.prototype._create = function (container) {
// emitted via emitter // emitted via emitter
this.hammer = new Hammer(this.dom.root); this.hammer = new Hammer(this.dom.root);
this.hammer.get('pinch').set({enable: true}); this.hammer.get('pinch').set({enable: true});
this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer.
this.listeners = {}; this.listeners = {};
var events = [ var events = [

+ 1
- 0
lib/timeline/component/CustomTime.js View File

@ -82,6 +82,7 @@ CustomTime.prototype._create = function() {
this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panstart', this._onDragStart.bind(this));
this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this));
this.hammer.on('panend', this._onDragEnd.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this));
this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer.
// TODO: cleanup // TODO: cleanup
//this.hammer.on('pan', function (event) { //this.hammer.on('pan', function (event) {
// event.preventDefault(); // event.preventDefault();

+ 1
- 0
lib/timeline/component/ItemSet.js View File

@ -198,6 +198,7 @@ ItemSet.prototype._create = function(){
this.hammer.on('panstart', this._onDragStart.bind(this)); this.hammer.on('panstart', this._onDragStart.bind(this));
this.hammer.on('panmove', this._onDrag.bind(this)); this.hammer.on('panmove', this._onDrag.bind(this));
this.hammer.on('panend', this._onDragEnd.bind(this)); this.hammer.on('panend', this._onDragEnd.bind(this));
this.hammer.get('pan').set({threshold:5, direction:30}); // 30 is ALL_DIRECTIONS in hammer.
// single select (or unselect) when tapping an item // single select (or unselect) when tapping an item
this.hammer.on('tap', this._onSelectItem.bind(this)); this.hammer.on('tap', this._onSelectItem.bind(this));

Loading…
Cancel
Save