Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flickering when loading elements #805

Closed
thSoft opened this issue Jan 22, 2015 · 8 comments
Closed

Flickering when loading elements #805

thSoft opened this issue Jan 22, 2015 · 8 comments
Labels
bug A bug in the code of Cytoscape.js
Milestone

Comments

@thSoft
Copy link

thSoft commented Jan 22, 2015

If I call load(), the old graph disappears for a short time, then the new one appears. It would be more user-friendly if this flashing did not occur.

@thSoft
Copy link
Author

thSoft commented Jan 22, 2015

(This is not perceivable when motion blur is enabled, but when it is disabled, it is apparent.)

@maxkfranz maxkfranz added enhancement bug A bug in the code of Cytoscape.js labels Jan 27, 2015
@maxkfranz maxkfranz added this to the 2.3.9 milestone Jan 27, 2015
@maxkfranz
Copy link
Member

Labelling as "bug" because of UI/UX implications; adding to 2.3.9 if it can be resolved without much impact/risk on code

@maxkfranz
Copy link
Member

Do you have an example? And could you provide browser/OS info etc?

I can't reproduce this. I see the new graph replace the old one without flicker, even with motionBlur: false and a large number of elements.

@maxkfranz
Copy link
Member

Removing from 2.3.9 milestone until reproducible

@maxkfranz maxkfranz removed this from the 2.3.9 milestone Feb 3, 2015
@thSoft
Copy link
Author

thSoft commented Feb 4, 2015

Here is a minimal example with the latest version: http://jsbin.com/pelofoqufa/1/edit?html,js,output The flickering is reproducible on Firefox, Chrome, Safari.

@maxkfranz maxkfranz added this to the 2.3.10 milestone Feb 5, 2015
@maxkfranz
Copy link
Member

Have you tried cy.batch() and making your own calls? http://jsbin.com/madiqoqalo/1/edit?js,console,output

It's almost always better not to use cy.load() and to make the calls to cy.add() and cy.layout() etc yourself.

As cy.load() had been complained about and caused confusion before, I think it should be removed from the docs and deprecated: #822

I'll try to add a fix in the meantime, but you may want to avoid cy.load() in future.

maxkfranz added a commit that referenced this issue Feb 5, 2015
maxkfranz added a commit that referenced this issue Feb 5, 2015
@maxkfranz
Copy link
Member

Snapshot: http://js.cytoscape.org/download/cytoscape.js-snapshot-faf63dac65-1423163894122.zip

Please let me know if this works for you, and if so I'll close this.

@thSoft
Copy link
Author

thSoft commented Feb 5, 2015

Oh, I see, remove() and add() in batch() works nicely: http://jsbin.com/wicune/1/edit?js,output

@thSoft thSoft closed this as completed Feb 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in the code of Cytoscape.js
Projects
None yet
Development

No branches or pull requests

2 participants