This PR updates the viewer layer artists to initialize all of the fields used for trace UUIDs when the layer artist is created. Currently these values are left as None until the relevant trace type is created. This causes a problem for any tools that create traces on the figure that don't have a meta field set: trace-getting methods such as e.g. _get_lines in the scatter layer artist can then pick up these traces in their results if _lines_id is still None. While all of the traces in glue-plotly have use the meta field of the trace, it's obviously better to make things more robust here rather than demand that any possible tool obey the same pattern.
This PR updates the viewer layer artists to initialize all of the fields used for trace UUIDs when the layer artist is created. Currently these values are left as
None
until the relevant trace type is created. This causes a problem for any tools that create traces on the figure that don't have ameta
field set: trace-getting methods such as e.g._get_lines
in the scatter layer artist can then pick up these traces in their results if_lines_id
is stillNone
. While all of the traces inglue-plotly
have use themeta
field of the trace, it's obviously better to make things more robust here rather than demand that any possible tool obey the same pattern.