devgeeks / Canvas2ImagePlugin

PhoneGap / Cordova plugin for iOS to save the contents of an HTML canvas to the device's Photo Library
211 stars 218 forks source link

save image when i click button #8

Closed mohamedzaher88 closed 11 years ago

mohamedzaher88 commented 11 years ago

i download this example http://cl.ly/0n1Y3j0S2Q2y but how can i save image when i click button not in the loading

devgeeks commented 11 years ago

Um... instead of calling canvas2ImagePlugin.saveImageDataToLibrary() on load, call it in response to clicking a button?

Just make sure you are not trying to access window.plugins.canvas2ImagePlugin before deviceready has fired.