javascript - How to prevent location change of all components after update of nodeDataArray of diagram? -


i have diagram:

var $ = go.graphobject.make; var diagram = $(go.diagram, element[0], {      initialcontentalignment: go.spot.topcenter,      initialscale: 1,      layout: $(go.layereddigraphlayout, { direction: 0 }),      isreadonly: false,      allowlink: true,      allowclipboard: false,      animationmanager.duration: 200,      undomanager.isenabled: false }); 

i create several simple elements , add them using addnodedatacollection method diagram model. change position of elements , add 1 more nodedataarray. expect after adding of new element position of old items won't changed not true. locations of items changed , elements aligned center. correct behaviour? didn't find how prevent recalculation of locations after adding new item in nodedataarray.

normally when add or remove node or link, layout performed again. in case diagram.layout happen again, moving manually adjusted node positions layout thinks should be. please read http://gojs.net/latest/intro/layouts.html more details, section "layout invalidation".

in case i'm not sure want accomplish. might sufficient set layout.isongoing false on layereddigraphlayout instance.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -