Browse Source

Fixed #3183 (#3184)

Fixes a race condition that set an item's group to be set to undefined
if it was dropped and then dragged again without a redraw happening in
between.
gemini
Joshua Walsh 7 years ago
committed by yotamberk
parent
commit
13ef7eeb63
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      lib/timeline/component/ItemSet.js

+ 6
- 0
lib/timeline/component/ItemSet.js View File

@ -1342,6 +1342,12 @@ ItemSet.prototype._onDragStart = function (event) {
this.touchParams.itemProps = [props]; this.touchParams.itemProps = [props];
} }
else { else {
if(this.groupIds.length < 1) {
// Mitigates a race condition if _onDragStart() is
// called after markDirty() without redraw() being called between.
this.redraw();
}
var baseGroupIndex = this._getGroupIndex(item.data.group); var baseGroupIndex = this._getGroupIndex(item.data.group);
var itemsToDrag = (this.options.itemsAlwaysDraggable.item && !item.selected) ? [item.id] : this.getSelection(); var itemsToDrag = (this.options.itemsAlwaysDraggable.item && !item.selected) ? [item.id] : this.getSelection();

Loading…
Cancel
Save