This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var elevator = elevators[0]; | |
var queueUp = []; | |
var queueDown = []; | |
var queueTempUp = []; | |
var queueTempDown = []; | |
var currentQueue = ''; | |
function updateIndicator() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
init: function(elevators, floors) { | |
var elevator = elevators[0]; | |
var queueUp = []; | |
var queueDown = []; | |
var currentQueue = ''; | |
function updateIndicator() { | |
if (currentQueue === '') { | |
elevator.goingUpIndicator(true); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ItemView = Marionette.ItemView.extend({ | |
modelEvents: { | |
'change:foo': 'onModelEvent' | |
}, | |
collectionEvents: { | |
'change:foo': 'onCollectionEvent' | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal | |
constructor: (@name) -> | |
move: (meters) -> | |
alert @name + " moved #{meters}m." | |
class Snake extends Animal | |
move: -> | |
alert "Slithering..." | |
super 5 |