mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user