-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Drag and drop custom fields #2872
Conversation
lib/timeline/component/ItemSet.js
Outdated
|
|
||
| if (itemData.type == 'range' || (itemData.end && itemData.start)) { | ||
| if (!itemData.end) { | ||
| var newItemData = JSON.parse(event.dataTransfer.getData("text")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why new var here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
lib/timeline/component/ItemSet.js
Outdated
| newItemData.type = newItemData.type || 'box'; | ||
| newItemData[this.itemsData._fieldId] = newItemData.id || util.randomUUID(); | ||
|
|
||
| if (newItemData.type == 'range' || (newItemData.end && newItemData.start)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could simplify the conditional case - basically just check for a type of range without an end date.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Can't find any logic fault in it.
Solves #2863