We would like to provide user-driven controls for rendering a plot. ("click to toggle label"). Currently, a barrier is that there is no way to preserve single-element state across renderings.
This reorganizes some internal logic in data layers to support this, and fixes a bug where state references were broken when new state was applied.
A new section is added to track annotations: layer_state.extra_fields: {full_element_id: {key: value} }, with helpers methods to get and set values.
On rendering, this "annotation cache" is provided to calculations that handle scalable layout directives (eg point size, shape, label). This information represents internal state and is not available to templates.
Purpose
We would like to provide user-driven controls for rendering a plot. ("click to toggle label"). Currently, a barrier is that there is no way to preserve single-element state across renderings.
This reorganizes some internal logic in data layers to support this, and fixes a bug where state references were broken when new state was applied.
A new section is added to track annotations:
layer_state.extra_fields: {full_element_id: {key: value} }
, with helpers methods to get and set values.On rendering, this "annotation cache" is provided to calculations that handle scalable layout directives (eg point size, shape, label). This information represents internal state and is not available to templates.