Fix field names in Transform #72
Labels
purs-0.15
A reminder to address this issue or merge this PR before we release PureScript v0.15.0
type: breaking change
A change that requires a major version bump.
Transform
currently looks like this:It doesn't cause any problems currently, because the arguments are just passed in order to
ctx.transform
andctx.setTransform
. But, the names of the last two fields are wrong, which can lead to confusion.In
setTransform
andtransform
(MDN docs links), they are primarily referred to asa, b, c, d, e, f
, but also asm11, m12, m21, m22, dx, dy
.Also,
ctx.getTransform
returns aDOMMatrix
, whose docs page mentions thate
andf
are equivalent tom41
andm42
respectively, and thatm31
andm32
mean something completely different, relating to 3D transformations.I remember talking briefly about this in Slack with Phil a while ago, but forgot to open an issue/PR for it.
I think the best solution would be to change
Transform
to look like this:Would this be reasonable to have as a breaking change for 0.14? I can make a PR for it if wanted.
The text was updated successfully, but these errors were encountered: