Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas2Image Plugin #55

Open
mario-aleo opened this issue Sep 17, 2015 · 3 comments
Open

Canvas2Image Plugin #55

mario-aleo opened this issue Sep 17, 2015 · 3 comments

Comments

@mario-aleo
Copy link

Hello,

I need some help here, I'm using phonegap with angular.js, but i can't get you plugin work with angular.
I've installed the plugin by cordova add plugin, on the onDeviceReady it's been called by:

var canvas2ImagePlugin = window.plugins.canvas2ImagePlugin;

and also I'm defining it on my controller as:

$scope.save = function(){
        var cnv = document.getElementById('pwMainCanvas');

        canvas2ImagePlugin.saveImageDataToLibrary(
            function(msg){
                console.log(msg);
            }, 
            function(err){
                console.log(err);
            }, 
            'pwMainCanvas'  /*or cnv, or pwMainCanvas*/
        );
};

Someone already had made it or know what I'm doing wrong?

Thanks.

@positlabs
Copy link

What is defining window.plugins?

I'm guessing if you follow the example code, it will work.

window.canvas2ImagePlugin.saveImageDataToLibrary(...)

@positlabs
Copy link

Actually...

I'm using cordova 5.3.3 for Android, and window.canvas2ImagePlugin is not defined on window. It seemed to be working until I updated cordova from 4.x

@ghost
Copy link

ghost commented Nov 30, 2015

Yes, I'm starting to think that the new Cordova is a problem with this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants