Skip to content

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

@shkleinik

Description

@shkleinik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions