feat: implemented focal point picker inside ImageVault
This commit is contained in:
@@ -4,6 +4,7 @@ import type { GenericObjectType } from "@contentstack/app-sdk/dist/src/types/com
|
||||
import type { Lang } from "../types/lang"
|
||||
import type {
|
||||
Config,
|
||||
FocalPoint,
|
||||
ImageVaultAsset,
|
||||
InsertResponse,
|
||||
PublishDetails,
|
||||
@@ -70,7 +71,8 @@ export function isImageVaultDAMConfig(
|
||||
// For RTE this function is not enough since rte:s also need attrs, like position and the size thats
|
||||
// chosen in the editor
|
||||
export function insertResponseToImageVaultAsset(
|
||||
response: InsertResponse
|
||||
response: InsertResponse,
|
||||
focalPoint: FocalPoint
|
||||
): ImageVaultAsset {
|
||||
const alt = response.Metadata?.find((meta) =>
|
||||
meta.Name.includes("AltText_")
|
||||
@@ -93,6 +95,7 @@ export function insertResponseToImageVaultAsset(
|
||||
height: response.MediaConversions[0].Height,
|
||||
aspectRatio: response.MediaConversions[0].FormatAspectRatio,
|
||||
},
|
||||
focalPoint,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user