|
@ -1235,6 +1235,7 @@ ItemSet.prototype._onDragStart = function (event) { |
|
|
var dragLeftItem = this.touchParams.dragLeftItem; |
|
|
var dragLeftItem = this.touchParams.dragLeftItem; |
|
|
var dragRightItem = this.touchParams.dragRightItem; |
|
|
var dragRightItem = this.touchParams.dragRightItem; |
|
|
this.touchParams.itemIsDragging = true; |
|
|
this.touchParams.itemIsDragging = true; |
|
|
|
|
|
this.touchParams.selectedItem = item; |
|
|
|
|
|
|
|
|
if (dragLeftItem) { |
|
|
if (dragLeftItem) { |
|
|
props = { |
|
|
props = { |
|
@ -1257,8 +1258,6 @@ ItemSet.prototype._onDragStart = function (event) { |
|
|
this.touchParams.itemProps = [props]; |
|
|
this.touchParams.itemProps = [props]; |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
this.touchParams.selectedItem = item; |
|
|
|
|
|
|
|
|
|
|
|
var baseGroupIndex = this._getGroupIndex(item.data.group); |
|
|
var baseGroupIndex = this._getGroupIndex(item.data.group); |
|
|
|
|
|
|
|
|
var itemsToDrag = (this.options.itemsAlwaysDraggable && !item.selected) ? [item.id] : this.getSelection(); |
|
|
var itemsToDrag = (this.options.itemsAlwaysDraggable && !item.selected) ? [item.id] : this.getSelection(); |
|
@ -1323,7 +1322,8 @@ ItemSet.prototype._onDragStartAddItem = function (event) { |
|
|
newItem.id = id; // TODO: not so nice setting id afterwards
|
|
|
newItem.id = id; // TODO: not so nice setting id afterwards
|
|
|
newItem.data = this._cloneItemData(itemData); |
|
|
newItem.data = this._cloneItemData(itemData); |
|
|
this._addItem(newItem); |
|
|
this._addItem(newItem); |
|
|
|
|
|
|
|
|
|
|
|
this.touchParams.selectedItem = newItem; |
|
|
|
|
|
|
|
|
var props = { |
|
|
var props = { |
|
|
item: newItem, |
|
|
item: newItem, |
|
|
initialX: event.center.x, |
|
|
initialX: event.center.x, |
|
|