|
@ -1229,8 +1229,15 @@ ItemSet.prototype._onDrag = function (event) { |
|
|
*/ |
|
|
*/ |
|
|
ItemSet.prototype._updateItemProps = function(item, props) { |
|
|
ItemSet.prototype._updateItemProps = function(item, props) { |
|
|
// TODO: copy all properties from props to item? (also new ones)
|
|
|
// TODO: copy all properties from props to item? (also new ones)
|
|
|
if ('start' in props) item.data.start = props.start; |
|
|
|
|
|
if ('end' in props) item.data.end = props.end; |
|
|
|
|
|
|
|
|
if ('start' in props) { |
|
|
|
|
|
item.data.start = props.start; |
|
|
|
|
|
} |
|
|
|
|
|
if ('end' in props) { |
|
|
|
|
|
item.data.end = props.end; |
|
|
|
|
|
} |
|
|
|
|
|
else if ('duration' in props) { |
|
|
|
|
|
item.data.end = new Date(props.start.valueOf() + props.duration); |
|
|
|
|
|
} |
|
|
if ('group' in props && item.data.group != props.group) { |
|
|
if ('group' in props && item.data.group != props.group) { |
|
|
this._moveToGroup(item, props.group) |
|
|
this._moveToGroup(item, props.group) |
|
|
} |
|
|
} |
|
|