0.1.0 • Published 2 years ago

@tyler.thayn/ui.patternlock v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

ui.patternlock

jQueryUi widget of an android like pattern lock mechanisim for web apps

Installation

npm install @tyler.thayn/ui.patternlock

Usage

require(['jquery', 'ui.patternlock'], ($, PatternLock) => {
	$(() => {
		let pl = new PatternLock()
		$('button.Show').on('click', () => {
			pl.Show().then(console.log)
		})
		$('button.Confirm').on('click', () => {
			pl.Show(true).then(console.log)
		})
	})
})

Api

Configuration

  • data (string:'')
  • confirm (boolean:false)
  • rows (number:4)
  • columns (number:4)
  • width (number:calculated)
  • height (number:calculated)
  • showPatternLine (boolean:true)
  • patternLineColor (string:'#000000')
  • lineWidth (number:10)
  • selectionColor (string:'#ff0000')
  • fieldName (string:'')
  • valueSeparator (string:',')
  • valueArray (array:[])
  • centerCircle (boolean:true)
  • centerCircleSize (number:20)
  • timeout (number:100)
  • allowRepeatSelection (boolean:true)

Events

  • entered - data (string) - confirmed (boolean)
  • hidden
  • shown