Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 29, 2019. It is now read-only.

Conversation

@yotamberk
Copy link
Member

Solves #2863


if (itemData.type == 'range' || (itemData.end && itemData.start)) {
if (!itemData.end) {
var newItemData = JSON.parse(event.dataTransfer.getData("text"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why new var here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

newItemData.type = newItemData.type || 'box';
newItemData[this.itemsData._fieldId] = newItemData.id || util.randomUUID();

if (newItemData.type == 'range' || (newItemData.end && newItemData.start)) {
Copy link
Contributor

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Copy link

@wimrijnders wimrijnders left a 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.

@yotamberk yotamberk merged commit bcbce0a into visjs:develop Apr 13, 2017
@yotamberk yotamberk mentioned this pull request Apr 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants