Undo pan/zoom after unselecting a node

This commit is contained in:
David Kaltschmidt
2015-11-12 15:00:06 +01:00
parent 3ca7415d47
commit b6905d136d

View File

@@ -350,6 +350,10 @@ const NodesChart = React.createClass({
},
restoreLayout: function(state) {
// undo any pan/zooming that might have happened
this.zoom.scale(state.scale);
this.zoom.translate(state.panTranslate);
const nodes = state.nodes.map(node => {
return node.merge({
x: node.get('px'),