Skip to content

Commit

Permalink
Fix horizontal container positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremypenner committed Jan 21, 2024
1 parent 43920bf commit f834ed8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inspector/region.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f834ed8

Please sign in to comment.