created new testJSON method which makes testing JSON comparisons really easy to debug. Also fixed small logic problem with new Image width and height getters. Reinabled all serialization/deserialization unit tests

This commit is contained in:
Eric Rowell
2013-03-24 16:30:43 -07:00
parent a3db78cc0f
commit 8a393cb6be
3 changed files with 38 additions and 31 deletions

View File

@@ -193,12 +193,12 @@
delete this.imageHitRegion;
},
getWidth: function() {
var image = this.getImage();
return this.attrs.width || image.width || 0;
var image = this.getImage();
return this.attrs.width || (image ? image.width : 0);
},
getHeight: function() {
var image = this.getImage();
return this.attrs.height || image.height || 0;
return this.attrs.height || (image ? image.height : 0);
},
_drawImage: function(context, a) {
if(a.length === 5) {