Commit 3f4295e3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

render positionGraph result without reloading the page.

parent 816911ee
......@@ -375,10 +375,6 @@
$("#layout_graph").button().click(
function (e) {
dream_instance.positionGraph();
// XXX dirty way to redisplay after jio is saved
setTimeout(function () {
window.history.go(0);
}, 500);
});
// Enable "Clear All" button
......
......@@ -167,10 +167,15 @@
var size_x = $('.window').width();
var size_y = $('.window').height();
$.each(data, function (node, pos) {
var top = Math.floor(pos.top * (canvas_size_y - size_y)) + "px";
var left = Math.floor(pos.left * (canvas_size_x - size_x)) + "px";
priv.updateElementCoordinate(node, {
top: Math.floor(pos.top * (canvas_size_y - size_y)) + "px",
left: Math.floor(pos.left * (canvas_size_x - size_x)) + "px"
top: top,
left: left,
});
$('#'+node).css('top', top);
$('#'+node).css('left', left);
jsPlumb.repaintEverything();
});
}
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment