VivaGraphJS
VivaGraphJS copied to clipboard
Internet Explorer - Update node positions using css or attr ?
I am experiencing a critical bug for attaching nodes atop of links.
This is the bug I have with last version of vivagraph and IE

On Safari, FF and Chrome it works fine, but also on internet android it does the same - nodes are not attached to links - nodes' position not updated as soon as they are placed on the graph.
I first wonder if it maybe a library issue: This is a work I've done using vivagraph 0.6.3, working ok also in IE: www.xdiscovery.com/en/graph/22
Could you please report if you meet an issue ? I think it is different than updating matrix transformation, for matrix is not used for nodes svg groups.
The only difference I have in the clogged example and the working one, is that I coded placing nodes making use of .css instead of .attr (I was experimenting with css transformation to maximize performance).
.placeNode(function(nodeUI, pos) {
$('#'+nodeUI.id).css('transform','translate(...)');
})
and
.placeNode(function(nodeUI, pos) {
$('#'+nodeUI.id).attr('transform','translate(...)');
})
Could it be that css transformation is handled differently from IE for an SVG object? I have still to test if cause it is that, please help in better understanding and learning about SVG and your library:
In both versions I use this way to place links:
// graphics for links:
graphics.link(function (link) {
var uiLine = Viva.Graph.svg('line')
// attr for line
return uiLine
}
I see in one of your examples you use instead .placeLink() function :
What does .placeLink() is needed for VS graphics.link(f(link){}?
-- Might it be an issue in not updating nodes' positions?
In the clogged example I also use xmlns:svg="http://www.w3.org/2000/svg" in node UI :
<g><circle fill="white" r="40" cx="0" cy="40"></circle><text xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" x="0" y="40"><tspan x="0" dy="0">Pinophyta</tspan></text></g>
Could it be the problem? when does one need to specify svg type in SVG?
Here I use it to handle and multilines - as you once suggested.
-- Might it be an issue for updating nodes coordinates in SVG groups?
And... What would you advice a simplest way you debug in IE? I am using remote MS remote desktop to avoid installking a virtual machine but also debugging in IE, well I m not used to and I m not that savvy in SVG specification - I wonder if they may break the code somehow.
Many thanks for debriefing!