Revert "frame a photograph on the page, at the size it is printed"
This reverts commit 812371b64a.
This commit is contained in:
@@ -27,7 +27,6 @@ export const BlockMedia = ({
|
||||
aspect,
|
||||
onUrl,
|
||||
onCrop,
|
||||
onDraft,
|
||||
}: {
|
||||
url: string | null;
|
||||
crop: string | null;
|
||||
@@ -35,14 +34,6 @@ export const BlockMedia = ({
|
||||
aspect: string;
|
||||
onUrl: (url: string | null) => void;
|
||||
onCrop: (crop: string | null) => void;
|
||||
/**
|
||||
* Every change to the draft, not only the saved one.
|
||||
*
|
||||
* The page shows the same photograph at full size, and it has to move when these buttons do —
|
||||
* otherwise the thumbnail and the page disagree for the 600ms until the save lands, which reads as
|
||||
* the control being broken rather than as it being debounced.
|
||||
*/
|
||||
onDraft?: (crop: string | null) => void;
|
||||
}) => {
|
||||
const [draft, setDraft] = useState<string | null>(crop);
|
||||
|
||||
@@ -55,10 +46,7 @@ export const BlockMedia = ({
|
||||
value={url}
|
||||
onChange={onUrl}
|
||||
crop={draft}
|
||||
onCropChange={(next) => {
|
||||
setDraft(next);
|
||||
onDraft?.(next);
|
||||
}}
|
||||
onCropChange={setDraft}
|
||||
aspect={aspect}
|
||||
label="Choose a photograph"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user