new toImage() method to support node caching

This commit is contained in:
Eric Rowell
2012-07-14 23:41:16 -07:00
parent 2629c1237c
commit 6dc7c685f0
5 changed files with 128 additions and 2 deletions

View File

@@ -1319,6 +1319,12 @@ Kinetic.Node = Kinetic.Class.extend({
return bufferLayer.getCanvas().toDataURL();
}
},
/**
* to image
*/
toImage: function() {
return Kinetic.Type._getImage(this.toDataURL());
},
_setImageData: function(imageData) {
if(imageData && imageData.data) {
this.imageData = imageData;

File diff suppressed because one or more lines are too long