From c1179554fd73334bf4c7e4b38315b4075f8d1e13 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 19 Jun 2014 11:50:50 +0200 Subject: [PATCH] Item touch events now bound to centerContainer instead of itemset (must be able to click in empty area) --- src/timeline/component/ItemSet.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/timeline/component/ItemSet.js b/src/timeline/component/ItemSet.js index 5ee83548..37f08aff 100644 --- a/src/timeline/component/ItemSet.js +++ b/src/timeline/component/ItemSet.js @@ -153,8 +153,10 @@ ItemSet.prototype._create = function(){ this._updateUngrouped(); // attach event listeners - // TODO: use event listeners from the rootpanel to improve performance? - this.hammer = Hammer(frame, { + // Note: we bind to the centerContainer for the case where the height + // of the center container is larger than of the ItemSet, so we + // can click in the empty area to create a new item or deselect an item. + this.hammer = Hammer(this.body.dom.centerContainer, { prevent_default: true });