summaryrefslogtreecommitdiffstats
path: root/assets/js/views/sample-editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'assets/js/views/sample-editor.js')
-rw-r--r--assets/js/views/sample-editor.js42
1 files changed, 42 insertions, 0 deletions
diff --git a/assets/js/views/sample-editor.js b/assets/js/views/sample-editor.js
new file mode 100644
index 0000000..bb06b01
--- /dev/null
+++ b/assets/js/views/sample-editor.js
@@ -0,0 +1,42 @@
+ClipPlay.Views.SampleEditor = Marionette.CollectionView.extend({
+ itemView: ClipPlay.Views.Sample,
+
+ initialize: function() {
+ this.initialize_clip_drag_handles();
+ this.initialize_player();
+ },
+
+
+ initialize_clip_drag_handles: function() {
+ var $clip_line = $('.js-clip-line');
+
+ $clip_line.draggable({
+ axis: 'x',
+ handle: '.js-drag-handle',
+ scroll: false,
+ containment: $clip_line.parents('.progress-bar')
+ });
+
+ $clip_line.on('drag', this.on_clip_drag_stop);
+ },
+
+
+ // this will soon be obsolete
+ initialize_player: function() {
+ this.player = new OP.Player($('#single-video-lets-see-if-we-can-get-this-to-work').get(0));
+ },
+
+
+ onRender: function() {
+ // Initialize view for adding new samples
+ this.sample_add_view = new ClipPlay.Views.SampleAddView({
+ el: $('#add-sample'),
+ collection: this.collection
+ });
+ },
+
+
+ on_clip_drag_stop: function(e, ui) {
+
+ }
+}); \ No newline at end of file