Base64Png Editor Tweak State Control
/** | |
* Create a Base64PngEdit and update the state control stack with it. We've updated the receive_newEdit notification with the Base64Edit in case the needs any additional information. | |
*/ | |
const tweakInvert = useCallback((value: string) => { | |
setInvert(value); | |
const command: Base64PngEdit = { | |
id: new Date().getTime().toString(), | |
filter: `invert(${value})`, | |
invert: value, | |
}; | |
stateControl.updateCommandStack(JSON.stringify(command)); | |
props.envelopeContext.channelApi.notifications.receive_newEdit(command); | |
}, [invert, stateControl]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment