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

API revisions for 3.0 #1092

Closed
maxkfranz opened this issue Sep 17, 2015 · 3 comments
Closed

API revisions for 3.0 #1092

maxkfranz opened this issue Sep 17, 2015 · 3 comments

Comments

@maxkfranz
Copy link
Member

@maxkfranz maxkfranz commented Sep 17, 2015

Improvements to the API that break backwards compatibility (sorted by most-to-least significant amount of changes needed to update your app):

  • Functions with the function(i, ele) signature become function(ele, i) etc, e.g. eles.each() #1531
    • eles.bfs()
    • eles.dfs()
    • eles.each()
    • eles.filter()
    • eles.positions()
    • eles.layoutPositions()
  • cy.layout() and eles.layout() return the layout rather than chaining the calling object #1533
  • Callbacks like weight should not set this #1535
    • eles.each()
    • eles.filter()
    • eles.positions()
    • eles.layoutPositions()
    • eles.bfs()
    • eles.dfs()
    • eles.dijkstra()
    • eles.aStar()
    • eles.bellmanFord()
    • eles.kruskal()
    • eles.floydWarshall()
    • eles.pageRank()
    • eles.closenessCentrality() & eles.closenessCentralityNormalized()
    • eles.betweennessCentrality() & eles.betweennessCentralityNormalized()
    • eles.degreeCentrality() & eles.degreeCentralityNormalized()
    • concentric layout (already deprecated)
    • cose layout (already deprecated)
  • Remove cy prefix on event fields, because we don't merge with the original event (as left open); e.g. cyTarget => target #1537
  • Clarify interactivity and visibility #1544
  • Remove :touch selector -- not reliable as some desktop browsers now implement touch APIs without hardware support #1540
  • Replace cy.onRender() and cy.offRender() with a render event #1541
  • grab event should happen on nodes being dragged; use grabon for differentiating which element the cursor or finger holds #1545
  • Remove jQuery plugin (still allow passing a jQuery element to init, but don't allow $('#cy-div').cytoscape(...) syntax) #1539
  • Remove the already deprecated cy.load() #1534
  • Remove deprecated layout() and scratch() mapper support in code #1536
  • Remove deprecated cy.initrender() #1538
  • Remove inhibitor arrow shape alias #1655
  • Remove mandatory weaver dependency on CoSE layout #1687
  • Remove all shadow style properties #1758
  • Remove data parameters in .on() etc #1764
@mj3cheun
Copy link
Member

@mj3cheun mj3cheun commented Feb 27, 2017

@maxkfranz Did you remove the Thread method from the cytoscape.js object? I am getting cytoscape.Thread returning a function in 2.x but returning undefined in 3.x.

@maxkfranz
Copy link
Member Author

@maxkfranz maxkfranz commented Feb 28, 2017

@mj3cheun Yes, you should require('weaverjs').Thread in the extension instead

@mj3cheun
Copy link
Member

@mj3cheun mj3cheun commented Feb 28, 2017

Ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.