Add scale content to render wasm

This commit is contained in:
alonso.torres 2025-05-28 14:40:39 +02:00
parent 46b0e4f0e7
commit bcfa9a82ea
18 changed files with 282 additions and 33 deletions

View file

@ -104,10 +104,12 @@ pub fn propagate_shape_constraints(
constraint_h: ConstraintH,
constraint_v: ConstraintV,
transform: Matrix,
ignore_constrainst: bool,
) -> Matrix {
// if the constrains are scale & scale or the transform has only moves we
// can propagate as is
if (constraint_h == ConstraintH::Scale && constraint_v == ConstraintV::Scale)
if (ignore_constrainst
|| constraint_h == ConstraintH::Scale && constraint_v == ConstraintV::Scale)
|| transform.is_translate()
{
return transform;