mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-26 16:16:31 -06:00
Nodes stay fixed after initial animation.
There is an animation of nodes layout after first load of graph or adding new node. Then all nodes of the graph are set to the fixed state. The node is set to fixed even after manual turn off of fixed state. https://fedorahosted.org/freeipa/ticket/5649 Reviewed-By: Petr Vobornik <pvoborni@redhat.com>
This commit is contained in:
parent
18a4053a68
commit
1cc582e9b8
@ -150,6 +150,21 @@ topology_graph.TopoGraph = declare([Evented], {
|
||||
l.linkDistance(150);
|
||||
l.charge(-1000);
|
||||
l.on('tick', lang.hitch(this, this._tick));
|
||||
|
||||
var that = this;
|
||||
|
||||
l.on('end', function () {
|
||||
var nodes = l.nodes();
|
||||
|
||||
for (var i = 0; i < nodes.length; i++) {
|
||||
var curr_node = nodes[i];
|
||||
|
||||
if (!curr_node.fixed) {
|
||||
curr_node.fixed = 1;
|
||||
that._save_node_info(curr_node);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
_get_local_storage_attr: function(id, attr) {
|
||||
@ -436,6 +451,7 @@ topology_graph.TopoGraph = declare([Evented], {
|
||||
d3.event.stopPropagation();
|
||||
//xor operation switch value of fixed from 1 to 0 and vice versa
|
||||
d.fixed = d.fixed ^ 1;
|
||||
self._layout.resume();
|
||||
})
|
||||
.call(drag);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user