s-yadav / patternLock

A light weight plugin to simulate android like pattern lock interface for your hybrid app or website.
MIT License
378 stars 141 forks source link

onDraw firing twice #21

Closed relez closed 7 years ago

relez commented 7 years ago

Hi there, I am trying to add this feature into my Cordova app and I just noticed that the event onDraw is being fired twice when I draw the pattern.

My code is very simple:

var pattern = new PatternLock(
        '#mypattern', 
        {
            matrix: [4,4], 
            radius: 20,
            onDraw: function(pattern) {
                pattern.disable();
            }
        }
    );

Any reason why? Thanks!