From f834ed81e99996cbb039c4f31e50d028bac98903 Mon Sep 17 00:00:00 2001 From: Jeremy Penner Date: Sun, 21 Jan 2024 12:42:12 -0500 Subject: [PATCH] Fix horizontal container positioning --- inspector/region.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inspector/region.js b/inspector/region.js index 2fc4b637..9c669ede 100644 --- a/inspector/region.js +++ b/inspector/region.js @@ -211,9 +211,9 @@ export const containedItemView = ({ object, containerProp, containerMod, contain const frames = propFramesFromMod(prop, mod) const frameSpace = compositeSpaces(frames) // if the contents are drawn in front, the container has its origin offset by the offset of its first cel. - const originX = containerProp.contentsInFront ? containerSpace.xOrigin + 2 : 0 + const originX = containerProp.contentsInFront ? containerSpace.xOrigin : 0 const originY = containerProp.contentsInFront ? containerSpace.yOrigin : 0 - const x = containerX + (flipHorizontal ? -originX + offsetX : originX - offsetX) + const x = (containerX - originX) + offsetX const y = containerY - (offsetY + originY) const z = containerProp.contentsInFront ? containerZ + 1 : containerZ - 1 const objectSpace = translateSpace(frameSpace, x, y)