Interface DrawingEditOptions

Options for a call that changes, groups or deletes drawings.

interface DrawingEditOptions {
    force?: boolean;
}

Properties

Properties

force?: boolean

Reach drawings whose policy sets editable: false as well, and the groups that hold them. Without it they are left exactly as they are, which is what keeps every control a host wires to the user off them. The host that placed such a drawing passes it to move, restyle, regroup or retire it. A forced call is the host's own act, not the user's, so it records no undo step, and every step already recorded takes it too: no later undo or redo reverses it, and a step it leaves with nothing to do is dropped.

Cost: taking a call into the recorded steps is one pass over the undo and redo history, parsing and rewriting both snapshots of every step, so it grows with the number of recorded steps (see historyLimit) times the drawing count. A forced delete, a forced grouping call, a forced patch to a drawing the user may edit or one that carries zIndex, any patch that carries policy and a linked chart's change of policy make that pass. A forced patch to a read-only drawing that carries neither policy nor zIndex (a level the host trails on every tick) makes none: history cannot reach that drawing's content while it stays read-only, so the patch is held and goes in with the next pass, which a change of its policy always makes.