We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c434769 commit 9cba886Copy full SHA for 9cba886
src/state.ts
@@ -168,8 +168,9 @@ export const layerAtoms = atom((get) => {
168
return layers.flatMap((layer) => {
169
let inner: Array<VizarrLayer> = !layer.on ? [] : [new layer.Layer(layer.layerProps)];
170
if (layer.imageLabel) {
171
- const { Layer, layerProps } = layer.imageLabel;
172
- const imageLabelLayers = layerProps.map((props) => new Layer(props));
+ const { Layer, layerProps, channelIndex } = layer.imageLabel;
+ const selection = layer.layerProps.selections[0].with(channelIndex, 0);
173
+ const imageLabelLayers = layerProps.map((props) => new Layer({ ...props, selection }));
174
inner.push(...imageLabelLayers);
175
}
176
return inner;
0 commit comments