fix: align psd layer hit testing
This commit is contained in:
parent
5e7809687c
commit
a3a41ef6e6
@ -4043,6 +4043,8 @@ export function AgentPsdTemplateEditorDialog({
|
||||
const layerPositionOffset =
|
||||
effectiveLayerPositionOffsets[layer.id] ||
|
||||
normalizeLayerPositionOffset();
|
||||
const baseZIndex =
|
||||
layerStackZIndexById.get(layer.id) || 1;
|
||||
const layerBoxStyle = {
|
||||
left: layer.x + layerPositionOffset.offsetX,
|
||||
top: layer.y + layerPositionOffset.offsetY,
|
||||
@ -4076,7 +4078,16 @@ export function AgentPsdTemplateEditorDialog({
|
||||
onPointerDown={(event) =>
|
||||
handleLayerDragStart(layer, event)
|
||||
}
|
||||
style={assignedImageContainerStyle}
|
||||
style={{
|
||||
...assignedImageContainerStyle,
|
||||
zIndex: baseZIndex,
|
||||
cursor:
|
||||
layerDragStateRef.current?.layerId ===
|
||||
layer.id
|
||||
? "grabbing"
|
||||
: "grab",
|
||||
touchAction: "none",
|
||||
}}
|
||||
title={`${getLayerLabel(layer)}:${layer.layerName}`}
|
||||
>
|
||||
<img
|
||||
@ -4148,7 +4159,16 @@ export function AgentPsdTemplateEditorDialog({
|
||||
onPointerDown={(event) =>
|
||||
handleTextDragStart(layer, event)
|
||||
}
|
||||
style={layerBoxStyle}
|
||||
style={{
|
||||
...layerBoxStyle,
|
||||
zIndex: baseZIndex,
|
||||
cursor:
|
||||
textDragStateRef.current?.layerId ===
|
||||
layer.id
|
||||
? "grabbing"
|
||||
: "grab",
|
||||
touchAction: "none",
|
||||
}}
|
||||
title={`${getLayerLabel(layer)}:${layer.layerName}`}
|
||||
>
|
||||
<img
|
||||
@ -4197,6 +4217,7 @@ export function AgentPsdTemplateEditorDialog({
|
||||
textFrame.offsetY,
|
||||
width: textFrame.width,
|
||||
height: textFrame.height,
|
||||
zIndex: baseZIndex,
|
||||
cursor:
|
||||
textDragStateRef.current?.layerId ===
|
||||
layer.id
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user