Sketch Auto Layout: Unexpected Child Layer Shift After Parent Symbol Update
0 reputation · 08 Jan 2024, 17:35 UTC
Symptom
When a parent symbol containing Auto Layout is updated, a child layer that has a Fixed constraint moves to a new position on the canvas. The change occurs even though the child’s constraints appear correct in the Layer Inspector.
Log Context
Sketch emits a generic warning in the Console whenever a symbol update triggers a layout recalculation. The message does not identify the specific constraint conflict or the override responsible for the shift.
Potential Interference
Batch updates that use the Distribute alignment options can override explicit Auto Layout constraints, causing inconsistent positions across instances. Additionally, symbol overrides applied via the Inspector are not logged with unique identifiers, making it difficult to trace the source of the movement.
Unresolved Questions
- What causes child layers to reposition when a parent symbol’s content size changes, even with ‘Fixed’ constraints?
- How can we trace which override triggered the shift given the generic console warnings?
- Does the ‘Distribute’ alignment option override Auto Layout constraints during batch updates, and if so, how can this be detected?