Created
July 31, 2013 11:40
-
-
Save kristoferjoseph/6121299 to your computer and use it in GitHub Desktop.
Reflow Mixin Example
This file contains 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
//... Omitted for brevity | |
var ViewMixin = { | |
addView: function (itemModel) { | |
var newView = ViewFactory.create(itemModel); | |
if (!newView) { | |
return; | |
} | |
var insertPos = Document.getInsertPosition(); | |
newView.insertIntoDom(insertPos); | |
} | |
}; | |
//... In another file | |
_.extend(BoxView.prototype, ViewMixin); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment