feat: implemented focal point picker inside ImageVault
This commit is contained in:
@@ -138,9 +138,15 @@ export default function ImageVaultDAM({
|
||||
(result?: InsertResponse) => {
|
||||
if (field) {
|
||||
flushSync(() => {
|
||||
setMedia(result || null)
|
||||
const data = result
|
||||
? {
|
||||
...result,
|
||||
FocalPoint: result.FocalPoint || { x: 50, y: 50 },
|
||||
}
|
||||
: null
|
||||
setMedia(data)
|
||||
// Data inside the field is supposed to be an empty object if nothing is selected
|
||||
field.setData(result || {})
|
||||
field.setData(data || {})
|
||||
document.body.style.overflow = "hidden"
|
||||
})
|
||||
}
|
||||
@@ -168,6 +174,13 @@ export default function ImageVaultDAM({
|
||||
),
|
||||
modalProps: {
|
||||
size: "max",
|
||||
style: {
|
||||
content: {
|
||||
maxHeight: "90dvh",
|
||||
width: "auto",
|
||||
},
|
||||
overlay: {},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user