Skip to content

Commit

Permalink
🖌️: add Transform.equals()
Browse files Browse the repository at this point in the history
  • Loading branch information
merryman authored and linusha committed Jul 2, 2024
1 parent 2168f1c commit e7c39e0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lively.graphics/geometry-2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,11 @@ export class Transform {
return value;
}

equals (other) {
if (!other) return false;
return JSON.stringify(this) === JSON.stringify(other);
}

// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// serialization
// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down

0 comments on commit e7c39e0

Please sign in to comment.