Skip to content

Releases

v1.1.1

Choose a tag to compare

@evanstern evanstern released this 13 Mar 15:59

Minor Patch

  • Fixed an issue when adding the same options object to two different instances during initialization, if a defaults option was defined for the instance prototype that returned an object, then the two resulting instances would both end up sharing the same resulting default object.

Here is an example of the bug:

// Define a Layout that applies defaults containing an object.
var MyLayout = BackboneLayout.extend({
  defaults: function() {
    return {shared: new SomeObject()}
  }
})

// Now, define shared options
var options = {
  'foo': 'bar'
}

// Finally, instantiate two instances of 'MyLayout', both sharing the same options object.
var layout1 = new MyLayout(options);
var layout2 = new MyLayout(options);

// They will both share the same 'shared' object
layout1.options.shared === layout2.options.shared;
>> true

This will no longer happen. The two instances will now have separate instances of the shared object.

v1.1.0

Choose a tag to compare

@evanstern evanstern released this 03 Mar 19:41

And almost right away the project is updated to v1.1.0.

Well, mostly it's because I didn't like how the ViewManager's various "get" methods worked. So, here are the changes:

Feature changes

  • ViewManager.getViews() returns the Backbone.View or Layout rather than the ManagedView
  • ViewManager.getViewsByModel() similarly returns the actual Layout
  • ViewManager.getManagedViews() has been added to return the ManagedViews instead.

This breaks some backward compatibility but, since the project is in a pretty early production-ready state I'm going to just skirt the issue by updating the minor release number. Also... no one is using this but me yet :-)

v1.0.0

Choose a tag to compare

@evanstern evanstern released this 03 Mar 17:48

backbone-layout has been "production ready" for quite some time. The v1.0.0 release should have been done two or three releases ago. But, better late than never.

There are a few new features of note in the official v1.0.0 release:

New Features

  • You can now look up views by their models via the ViewManager.getViewsByModel method (see updated README)
  • A unRegisterView method has been added to BackboneLayout. It functions as a reverse of the registerView method. It will remove a specific view from the list of registered views and unbind it.

Minor refactors

  • Tests now pass jshint
  • Upgraded the required Backbone version to 1.1.2 in order to take advantage of the AMD loading provided by that update.
  • The UMD definition is more robust now and takes advantage of Backbone and Underscore's AMD definitions.
  • General code cleanup and minor refactoring.

0.1.4

Choose a tag to compare

@evanstern evanstern released this 11 Feb 21:47

Update component libraries.

  • jQuery to 2.1.0
  • Underscore to 1.6.0