Skip to main content

Set legacy persistent actions

Legacy effects — Show, Hide, Toggle, Set Style, Toggle Style — originally edited the diagram on the drawing canvas. When you clicked on a custom link containing one of these actions, this would write to the diagram data, the changes would be added to the undo stack, and they would be propagated to collaborators who were also editing or viewing the diagram.

This behaviour is preserved for backwards compatability via a transient: false action parameter.

The flag is intentionally hidden from the dialog. Select Edit Text and switch to the JSON description to edit this by hand, or use the external link tool:

For example:

{"show":  {"cells": ["A"], "transient": false}}
{"hide": {"cells": ["B"], "transient": false}}
{"toggle": {"cells": ["C"], "transient": false}}
{"style": {"cells": ["D"], "key": "fillColor", "value": "#ff0000", "transient": false}}
{"toggleStyle": {"cells": ["E"], "key": "shadow", "defaultValue": "0", "transient": false}}

With transient: false set, the action goes through the normal diagram edit process: you can undo the change, save it to the diagram file, and propagate it to other people viewing the diagram in realtime.

Use the persistent action flag only when you genuinely need the change to stick — for example, a link asking the user to "click to permanently reveal details" where the next viewer should see the revealed state.

Presentation animations, layered hover-reveal effects, and lightbox playback actions should all be transient (the default transient: false setting) so each viewer starts from the same diagram state.

Custom action effects not in the list above (fades, wipes, pops, opacity, highlight, flow, scroll, viewbox, select, open, tags, wait) are always transient — there's no transient: false equivalent for them, because they do not edit the diagram data.

Refer to the full list of animation actions and to the JSON action reference for more details on how to write action animations in the JSON directly.