Skip to content

Commit

Permalink
Simplify ordering of drawer items (#1393)
Browse files Browse the repository at this point in the history
  • Loading branch information
barryo-learningpool committed Jul 24, 2017
1 parent c11122a commit 199044c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/core/js/drawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ define([
'core/js/views/drawerView'
], function(Adapt, DrawerView) {

var DrawerCollection = new Backbone.Collection();
var DrawerCollection = new Backbone.Collection(null, { comparator: 'drawerOrder' });
var Drawer = {};

DrawerCollection.comparator = function (item) {
return item.get('drawerOrder');
};

Drawer.addItem = function(drawerObject, eventCallback) {
drawerObject.eventCallback = eventCallback;
DrawerCollection.add(drawerObject);
Expand Down

0 comments on commit 199044c

Please sign in to comment.