From 7a417337c9d0049532b1a27f804c175f17a12621 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 4 Jun 2015 11:53:20 +0200 Subject: [PATCH 1/2] Fixed #923: Added a property `event` to the properties emitted with the `select` event --- HISTORY.md | 1 + docs/timeline/index.html | 1 + lib/timeline/component/ItemSet.js | 6 ++++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.md b/HISTORY.md index 8dd044ac..e22310f4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -11,6 +11,7 @@ http://visjs.org ### Timeline - Added axis orientation option `'none'`. +- Added a property `event` to the properties emitted with the `select` event (see #923). - Improved function `fit()` to take into account the actual width of items. - Fixed #897: Timeline option `{snap: null}` did give a validation error. diff --git a/docs/timeline/index.html b/docs/timeline/index.html index eb1c058f..eaa79b60 100644 --- a/docs/timeline/index.html +++ b/docs/timeline/index.html @@ -1256,6 +1256,7 @@ timeline.off('select', onSelect); Fired after the user selects or deselects items by tapping or holding them. diff --git a/lib/timeline/component/ItemSet.js b/lib/timeline/component/ItemSet.js index 1c3d6c7b..43c27871 100644 --- a/lib/timeline/component/ItemSet.js +++ b/lib/timeline/component/ItemSet.js @@ -1405,7 +1405,8 @@ ItemSet.prototype._onSelectItem = function (event) { // except when old selection is empty and new selection is still empty if (newSelection.length > 0 || oldSelection.length > 0) { this.body.emitter.emit('select', { - items: newSelection + items: newSelection, + event: event }); } }; @@ -1530,7 +1531,8 @@ ItemSet.prototype._onMultiSelectItem = function (event) { this.setSelection(selection); this.body.emitter.emit('select', { - items: this.getSelection() + items: this.getSelection(), + event: event }); } }; From 805efd3e6e8c04710fc09a978bcf085e80560055 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 4 Jun 2015 12:43:42 +0200 Subject: [PATCH 2/2] Fixed #925: Event `timechanged` did not fire when mouse has been moved outside the timeline. --- HISTORY.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.md b/HISTORY.md index e22310f4..f11a9ef0 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,6 +14,8 @@ http://visjs.org - Added a property `event` to the properties emitted with the `select` event (see #923). - Improved function `fit()` to take into account the actual width of items. - Fixed #897: Timeline option `{snap: null}` did give a validation error. +- Fixed #925: Event `timechanged` did not fire when mouse has been moved outside + the timeline. ### Graph2D diff --git a/package.json b/package.json index 45752411..f80da958 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "keycharm": "^0.2.0", "uuid": "^2.0.1", "moment": "^2.10.2", - "propagating-hammerjs": "^1.4.2" + "propagating-hammerjs": "^1.4.3" }, "devDependencies": { "babel": "^5.1.11",