0.0.7 • Published 8 years ago

backbone-layout v0.0.7

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

Backbone.Layout

A simple layout manager for Backbone. Backbone.Layout provides easy view life cycle managment for composite views.

Build Status

API

.setView(view[, selector][, options])

  • view an instance of a Backbone view
  • selector a css selector (optional)
  • options configuration options (optional)
    • append by default, setView replaces views
    • cache cache long-running views when replacing (do not call remove or render)
    • toggle similar to cache, do not call remove or render. Instead toggles view.$el, preserving UI state such as the scroll bar.

This attaches a view to a selector. If no selector is provided, the view is attached to the layouts el. Multiple views may be attached to a single element with the append option. Long-running views may be preserved across renders and replacements with the cache option.

Development

This project uses a gulp-based build, npm for package management, and mocha, jshint and phantomjs for testing. The development source is in backbone.layout.js and tests are in spec/. `To begin devleopment:

  • npm install install packages
  • gulp starts the develpment watcher
  • gulp test executes the test suite
  • gulp build builds the production version
0.0.7

8 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago