|
@ -43,6 +43,7 @@ function ItemSet(body, options) { |
|
|
|
|
|
|
|
|
selectable: true, |
|
|
selectable: true, |
|
|
multiselect: false, |
|
|
multiselect: false, |
|
|
|
|
|
allDraggable: false, |
|
|
|
|
|
|
|
|
editable: { |
|
|
editable: { |
|
|
updateTime: false, |
|
|
updateTime: false, |
|
@ -307,7 +308,7 @@ ItemSet.prototype._create = function(){ |
|
|
ItemSet.prototype.setOptions = function(options) { |
|
|
ItemSet.prototype.setOptions = function(options) { |
|
|
if (options) { |
|
|
if (options) { |
|
|
// copy all options that we know
|
|
|
// copy all options that we know
|
|
|
var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; |
|
|
|
|
|
|
|
|
var fields = ['type', 'align', 'order', 'stack', 'selectable', 'multiselect', 'allDraggable', 'multiselectPerGroup', 'groupOrder', 'dataAttributes', 'template', 'groupTemplate', 'hide', 'snap', 'groupOrderSwap']; |
|
|
util.selectiveExtend(fields, this.options, options); |
|
|
util.selectiveExtend(fields, this.options, options); |
|
|
|
|
|
|
|
|
if ('orientation' in options) { |
|
|
if ('orientation' in options) { |
|
@ -1172,7 +1173,7 @@ ItemSet.prototype._onDragStart = function (event) { |
|
|
var me = this; |
|
|
var me = this; |
|
|
var props; |
|
|
var props; |
|
|
|
|
|
|
|
|
if (item && item.selected) { |
|
|
|
|
|
|
|
|
if (item && (item.selected || this.options.allDraggable)) { |
|
|
|
|
|
|
|
|
if (!this.options.editable.updateTime && |
|
|
if (!this.options.editable.updateTime && |
|
|
!this.options.editable.updateGroup && |
|
|
!this.options.editable.updateGroup && |
|
@ -1213,7 +1214,9 @@ ItemSet.prototype._onDragStart = function (event) { |
|
|
|
|
|
|
|
|
var baseGroupIndex = this._getGroupIndex(item.data.group); |
|
|
var baseGroupIndex = this._getGroupIndex(item.data.group); |
|
|
|
|
|
|
|
|
this.touchParams.itemProps = this.getSelection().map(function (id) { |
|
|
|
|
|
|
|
|
var itemsToDrag = (this.options.allDraggable && !item.selected) ? [item.id] : this.getSelection(); |
|
|
|
|
|
|
|
|
|
|
|
this.touchParams.itemProps = itemsToDrag.map(function (id) { |
|
|
var item = me.items[id]; |
|
|
var item = me.items[id]; |
|
|
var groupIndex = me._getGroupIndex(item.data.group); |
|
|
var groupIndex = me._getGroupIndex(item.data.group); |
|
|
return { |
|
|
return { |
|
|