Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Latest commit

 

History

History
28 lines (16 loc) · 700 Bytes

README.md

File metadata and controls

28 lines (16 loc) · 700 Bytes

loop-grid-selector

Range selector for loop-grid.

API

var Selector = require('loop-grid-selector')

var selection = Selector(shape)

Returns an extended instance of ObservGrid with shape specified.

selector.start(inputGrid, done)

Pass in an observable ArrayGrid. done will be called on stop or before subsequent start.

Any truthy values will trigger a selection. Simultaneous true values will trigger range selection. selection will have .set(selectedIndexes) called on every change.

selector.clear()

Sets selection to an empty array.

selector.stop()

Release watch of inputGrid and call done.