stage.toDataURL in KineticJS doesn't work
Here is how i decorate the stage:
every time user drag an image outside KineticJS:
create a image onto where it is dropped
layer.add(new_image)
stage.add(layer)
finally:document.getElementById('save').addEventListener('click',
function() {
stage.toDataURL({
callback: function(dataUrl) {
window.open(dataUrl);
}
});
}, false);
And there is a button with id=save in html
All the image are from my local machine, so different domain issue may not
matter. Any suggestions? THX!!
No comments:
Post a Comment