Add CANCEL to the watermark editor, scope the mark's touch layer to that editor, and stop a library frame following the user onto the camera
The custom watermark captured EVERY image touch whenever the chip was ON with text, in both modes: after switching from a library photo to the camera there was no way to give the image back to tap-to-focus, and a frame picked for the still rode along onto the live preview (and into the capture). - AdjustPanel: CANCEL chip next to ACCEPT. It drops the un-accepted draft and restores the last ACCEPTED mark (none if nothing was accepted). - Viewfinder: draws the mark whenever the chip is ON with text, but only lets it CAPTURE touches while its editor is open (new wmEditing prop). A double-tap ON the mark still re-opens that editor from the library viewer. - App: ACCEPT and CANCEL now close the editor (that closes the placement layer with it). Switching mode closes the deck panels, and leaves the frame behind: camera mode has no FRAME picker to undo one. Verified on device (9a6a7277): camera tap locks AE/AF with the watermark left ON; library polaroid no longer appears on the live preview after the switch; CANCEL reverts the chip to CUSTOM WATERMARK OFF and closes the panel; ACCEPT closes it and the next capture embeds the mark (amber text found at 0.5/0.375 of the 3000x4000 export), while a capture before ACCEPT carries none.
This commit is contained in:
@@ -58,6 +58,10 @@ interface AdjustmentPanelProps {
|
||||
// ACCEPT: copy the live draft into the mark the export burns in. Edits stay a
|
||||
// draft (viewfinder preview only) until this is pressed.
|
||||
onAcceptCustomWm: () => void;
|
||||
// CANCEL: throw the un-accepted draft away — back to the mark that was last
|
||||
// ACCEPTED (or none at all) — and close the editor. The way out of a running
|
||||
// watermark edit that previously did not exist.
|
||||
onCancelCustomWm: () => void;
|
||||
// Bumped by a double-tap on the mark: put the caret back in the text input.
|
||||
wmEditNonce: number;
|
||||
}
|
||||
@@ -139,6 +143,7 @@ export default function AdjustmentPanel({
|
||||
customWm,
|
||||
onUpdateCustomWm,
|
||||
onAcceptCustomWm,
|
||||
onCancelCustomWm,
|
||||
wmEditNonce,
|
||||
onToggleRotation,
|
||||
}: AdjustmentPanelProps) {
|
||||
@@ -526,6 +531,13 @@ export default function AdjustmentPanel({
|
||||
active: true,
|
||||
onPress: onAcceptCustomWm,
|
||||
})}
|
||||
{customWm.enabled &&
|
||||
renderChip({
|
||||
key: 'custom-wm-cancel',
|
||||
label: 'CANCEL',
|
||||
active: false,
|
||||
onPress: onCancelCustomWm,
|
||||
})}
|
||||
{customWm.enabled && renderChip(groupChip('wmColor'))}
|
||||
{customWm.enabled && renderChip(groupChip('wmSize'))}
|
||||
{customWm.enabled && renderChip(groupChip('wmFont'))}
|
||||
|
||||
Reference in New Issue
Block a user