Bug: constraints are incompatible with variable-mode width/height

The bug: constraint positioning is applied before variable mode width, and is not checked again after.

Example: I have an object that is centered using a Centered constraint. I use variable modes to set the width: 1000px wide in desktop mode and 600px wide in tablet mode.

Expectation: The object should be able to change size and remain centered.

What happens:

  1. Object is centered using Constraint setting
  2. I change mode from desktop to tablet
  3. Object changes width from 1000px to 600px*
  4. Object is no longer centered

*Width is always applied from top left.

Thanks!