feat(ui): make control image opacity filter toggleable

This commit is contained in:
psychedelicious
2024-04-30 18:50:29 +10:00
committed by Kent Keirsey
parent 1212698059
commit 8a791d4f16
6 changed files with 46 additions and 11 deletions

View File

@ -72,7 +72,7 @@ export const useLayerOpacity = (layerId: string) => {
createSelector(selectControlLayersSlice, (controlLayers) => {
const layer = controlLayers.present.layers.filter(isControlAdapterLayer).find((l) => l.id === layerId);
assert(layer, `Layer ${layerId} not found`);
return Math.round(layer.opacity * 100);
return { opacity: Math.round(layer.opacity * 100), isFilterEnabled: layer.isFilterEnabled };
}),
[layerId]
);