From 07a2d8bd152fc1433fa7b5fc81b9fa36e7095e63 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 10 Nov 2013 11:24:11 -0500 Subject: Move initialize above onRender method --- assets/js/views/sample.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'assets') diff --git a/assets/js/views/sample.js b/assets/js/views/sample.js index aa07acd..de9e967 100644 --- a/assets/js/views/sample.js +++ b/assets/js/views/sample.js @@ -5,12 +5,6 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ 'click .js-remove-sample' : 'remove_sample' }, - onRender: function() { - this.initialize_player(); - this.initialize_clip_lines(); - this.$('.js-keyboard-key').val(this.model.get('key')); - }, - initialize: function(options){ this.collection = options.collection; @@ -18,6 +12,12 @@ ClipPlay.Views.Sample = Marionette.ItemView.extend({ this.key_bind(); }, + onRender: function() { + this.initialize_player(); + this.initialize_clip_lines(); + this.$('.js-keyboard-key').val(this.model.get('key')); + }, + initialize_player: function() { var that = this; $.embedly.oembed(this.model.get('url')).done(function(results){ -- cgit v1.2.3