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

Add otherClass property to options #36

Closed thirdwheel closed 4 years ago

thirdwheel commented 4 years ago

This allows the user to specify an additional class for the pattern holder. I had a need to override the background colour in my project and found that the process of initialising the pattern window would overwrite any classes I already had. Not sure if this is the best approach but figured it was worth a try.

s-yadav commented 4 years ago

This is not needed. You can just add a class on the pattern holder and it will keep it. Ex:

<div id="pattern-holder" class="your-class"></div>
const lock = new PatternLock('#pattern-holder');

In this case, it will keep the your-class.

thirdwheel commented 4 years ago

This is not needed. You can just add a class on the pattern holder and it will keep it. Ex:

<div id="pattern-holder" class="your-class"></div>
const lock = new PatternLock('#pattern-holder');

In this case, it will keep the your-class.

No, it doesn't.

thirdwheel commented 4 years ago

Correction, yes it does. No idea why it didn't work for me.