0.0.7 • Published 9 years ago
backbone-layout v0.0.7
Backbone.Layout
A simple layout manager for Backbone. Backbone.Layout provides easy view life cycle managment for composite views.
API
.setView(view[, selector][, options])
viewan instance of a Backbone viewselectora css selector (optional)optionsconfiguration options (optional)appendby default,setViewreplaces viewscachecache long-running views when replacing (do not callremoveorrender)togglesimilar to cache, do not callremoveorrender. Instead togglesview.$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 installinstall packagesgulpstarts the develpment watchergulp testexecutes the test suitegulp buildbuilds the production version