Closed moayuisuda closed 3 years ago
If this is true, this is a bug. However, your codepen is not working for me!
I just noticed this bug (relative: true
has no effect in first argument to transform
) while reading the source code. Specifically, the following line looks at the second argument (relative
) but does not look at o.relative
as claimed in the documentation:
Actually, the documentation for transform()
as setter also mentions that relative
can be a point-like object, and new Matrix
follows this claim:
Given this conflict, I wonder if the documentation should be changed, to remove the claim that relative: true
works, and instead encourage use of the second argument...
Good catch. Yes, we introduced a different relative-thing for transforms without noticing the overlap. I will remove it from the docs since it just doesn't work
I'm following the code example below to transform relatively:
But the code only work with
element.transform({ rotate: 125 }).transform({ rotate: 37.5 }, true)
element.transform({ rotate: 125 }).transform({ rotate: 37.5, relative: true })
will transform absolutely codepen