On Thu, Jun 5, 2014 at 3:28 PM, Robert O'Callahan <rob...@ocallahan.org>
wrote:

> On Fri, Jun 6, 2014 at 9:07 AM, Rik Cabanier <caban...@gmail.com> wrote:
>
>> There are 2 things that I have questions about:
>> 1. isIdentity()
>> We settled that this should mean that the matrix was never changed to a
>> non
>> identity state.
>> This means that the following code:
>>
>> var m = new DOMMatrix();
>>
>> m.rotate(0);
>>
>> m.isIdentity() == false; //!
>>
>> Given this, I feel that maybe we should rename it to hasChanged or
>> isInitial,
>>
>
> We can define "rotate(v)" to set isIdentity to false if v != 0.0 (and
> similarly for other methods such as translate). Then, in your case,
> isIdentity would still be true. That was my original intent.
>

Works for me. This is how I implemented it in mozilla (except for the
rotate part which I will address next)


> Then there's this case:
> var m = new DOMMatrix();
> m.translate(-1,-1);
> m.translate(1,1);
> m.isIdentity() == false
>
> I'm OK with that. Maybe we do need a better name though. Invert the
> meaning and call it "maybeHasTransform()"?
>

That sounds good to me.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to