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

@BTMorton
Copy link
Contributor

Add check for parent existence when changing group in Item.setData.
Add subgroup updates to Item.setData.
Remove group updating logic from ItemSet._updateItem.
Fixes #2939

Add subgroup updates to Item.setData.
Remove group updating logic from ItemSet._updateItem.
Fixes visjs#2939
Copy link
Member

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

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

Why did you 'Remove group updating logic from ItemSet._updateItem.' ?

@BTMorton
Copy link
Contributor Author

Because it's duplicated in Item.setData, where it calls ItemSet.moveToGroup on the parent's item set. What was happening was the Group.remove call in ItemSet._updateItem was setting Item.parent = null which throws an error when trying to make that call. Removing the group update logic from ItemSet._updateItem means the error doesn't get thrown and the group is update during the Item data update. I think it was supposed to be removed when the moveToGroup call was added, but wasn't...

Copy link
Member

@yotamberk yotamberk left a comment

Choose a reason for hiding this comment

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

Awesome! Thanks again! Well done

@yotamberk yotamberk merged commit 79bb381 into visjs:develop Apr 28, 2017
@mojoaxel mojoaxel added this to the Minor Release v4.20 milestone May 19, 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.

3 participants