Skip to content

Instantly share code, notes, and snippets.

@oslego
Created November 1, 2013 16:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oslego/7267999 to your computer and use it in GitHub Desktop.
Save oslego/7267999 to your computer and use it in GitHub Desktop.

JavaScript library to help working with CSS Regions. Handles prefixes internally.

API

flow = Flow('flow-name') Get the NamedFlow by name.

flow.fitWith('<div class="region">') Make the flow fit by adding elements to the region chain

flow.autoFit('<div class="region">')

flow.trim() Remove empty regions.

flow.fits {Boolean}

flow.on('change')

flow.on('trim')

flow.on('fit')

flow.regionsFromPoint(x,y) -> Array of DOM elements

flow.regionFromPoint(x,y) -> DOM element || null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment