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

Item Redraw Performance - Bug Fix #3513

Merged
merged 2 commits into from
Oct 2, 2017

Conversation

Areson
Copy link
Contributor

@Areson Areson commented Oct 1, 2017

This is in reference to #3475, specifically my comment made on 10/1/2017 regarding the performance enhancement causing the vertical position of items to jump around while scrolling horizontally. The issue was due to the calls being made to repositionX on each item not happening. The item collection on the Group class are an object, not an array, so the normal for loop wasn't doing anything. Changed it to use the utility forEach method which seems to have resolved the issue.

…s an object, not an array, so it cannot be iterated over using a normal for loop. Not repositioning the items causes the vertical stacking to jump around sporatically while scrolling.
for (i = 0; i < this.items.length; i++) {
this.items[i].repositionX(limitSize);
}
util.forEach(this.items, function (item, key) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the key.
The linting is failing.

@yotamberk
Copy link
Contributor

nvm, I fixed it.

@yotamberk yotamberk merged commit 2860d73 into almende:develop Oct 2, 2017
primozs pushed a commit to primozs/vis that referenced this pull request Jan 3, 2019
* Fixing a bug with the call to `repositionX`. The `items` collection is an object, not an array, so it cannot be iterated over using a normal for loop. Not repositioning the items causes the vertical stacking to jump around sporatically while scrolling.

* Update Group.js
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