jit icon indicating copy to clipboard operation
jit copied to clipboard

"offsetY" setting doesn't work after "removeSubtree" call

Open shkleinik opened this issue 10 years ago • 0 comments

Hi, I'm trying to implement editable chart with "top" orientation. I want my chart be centred horizontally and stick to top vertically:

    var spaceTree = new $jit.ST({
                                  injectInto: container.id,
                                  orientation: "top",
                                  offsetY: 300
                               });

After I remove some subtree, entire tree is moved from the canvas to the center:

    spaceTree.removeSubtree(nodeId, true, "animate", {
                    hideLabels: false,
                    onComplete: function () {
                        console.log("subtree removed");
                    }
                }

Maybe somebody can suggest some workaround (set start point not on the canvas center but at the x/2, 0 + myOffset)?

P.S. By the way with 'replot' option NO reposition to center happens.

shkleinik avatar Mar 27 '15 07:03 shkleinik