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 #2300

@@ -25,231 +25,232 @@ var BACKGROUND = '__background__'; // reserved group id for background items wit
* @extends Component
*/
function ItemSet(body, options) {
this.body = body;
Copy link
Member

Choose a reason for hiding this comment

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

You updated the indent to tabs. I like that! Sadly this makes this Pull-Request un-reviewable. Could you maybe change that back?

Copy link
Member Author

Choose a reason for hiding this comment

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

Can you recommend an easy way to revert this specific commit?

}
this.dom.label = label;

var collapseGroupBtn = document.createElement('div');
Copy link
Member

Choose a reason for hiding this comment

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

I think the whole collapseGroupBtncan be removed, now that the arrow is done is CSS.

}

.vis-nested-group {
background: #e5e5e5;
Copy link
Member

Choose a reason for hiding this comment

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

I personally would prefer something even a little lighter like #f5f5f5

if (this.showNested) {
util.removeClassName(this.dom.label, 'collapsed');
util.addClassName(this.dom.label, 'expanded');
// this.dom.collapseGroupBtn.innerHTML = '▼';
Copy link
Member

Choose a reason for hiding this comment

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

This comments can be removed to keep the code clean

@yotamberk
Copy link
Member Author

@mojoaxel Fixed the comments =)

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

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

still a few wrong indents, but otherwise very nice!

groupsData.update(targetGroup);
this.options.groupOrderSwap(draggedGroup, targetGroup, groupsData);
groupsData.update(draggedGroup);
groupsData.update(targetGroup);
Copy link
Member

Choose a reason for hiding this comment

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

indent =)

me.options.groupOrderSwap(switchGroup, shouldBeGroup, dataset);
groupsData.update(switchGroup);
groupsData.update(shouldBeGroup);
groupsData.update(shouldBeGroup);
Copy link
Member

Choose a reason for hiding this comment

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

indent =)

Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

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

I get an error Cannot redraw item: no parent attached running this new example. I'm not sure if it's a problem introduced by this PR but we should have a look.

{
id: 13,
content: "clean house",

Copy link
Member

Choose a reason for hiding this comment

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

empty line

<td>Provides a means to toggle the whether a group is displayed or not. Defaults to <code>true</code>.</td>
</tr>
<tr>
<td>nestedGroups</td>
Copy link
Member

Choose a reason for hiding this comment

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

Now that I look at it I think "subGroups" would have been the better work, but I'm ok with this.

Copy link
Member Author

Choose a reason for hiding this comment

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

subGroups refer to groups in a group and not nested underneath. So I actually prefer nestedGroups.


// create a dataset with items
var items = new vis.DataSet();
var groupIds = groups.getIds()
Copy link
Member

Choose a reason for hiding this comment

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

missing semicolon

id: 3,
content: "John",
nestedGroups: [14],
showNested: false
Copy link
Member

Choose a reason for hiding this comment

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

The showNested: false causes the bad error Cannot redraw item: no parent attached. Looks like Items can not be attached to groups that are not visible.
This needs to be fixed !

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm on it at this moment. It's a weird problem. trying to figure out what is causing this exactly...

@yotamberk
Copy link
Member Author

@mojoaxel Hey! I just managed to figure out how to fix that warning that occurred with my PR. Took me 4 days but managed eventually... It seems like it was a warning that already occurred with the addition of the visible group. Trying to initialize a group with visible:false was also causing this issue. I fixed it for all cases.
Can you please review and merge this? I want to get rid of the PRs that are accumulating

@yotamberk
Copy link
Member Author

@mojoaxel Can you please review this again and accept it?

@mojoaxel mojoaxel merged commit 8ab1d18 into visjs:develop Dec 29, 2016
@yotamberk yotamberk deleted the nested-groups branch March 4, 2017 19:34
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.

2 participants