Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added the ability to play and stop the music via the amplifier

  • Loading branch information...
commit 1b231cb3a651f4dce0407066a84ea84d47e1e65e 1 parent 7839982
Nathaniel Escribano authored

Showing 2 changed files with 24 additions and 2 deletions. Show diff stats Hide diff stats

  1. +8 0 src/assets/app.css
  2. +16 2 src/views/outputView.js
8 src/assets/app.css
@@ -34,3 +34,11 @@ body {
34 34 .deselected {
35 35 opacity: .6;
36 36 }
  37 +
  38 +#amplifier {
  39 + opacity: .2;
  40 +}
  41 +
  42 +#amplifier.selected {
  43 + opacity: 1;
  44 +}
18 src/views/outputView.js
@@ -3,9 +3,23 @@ Maw.OutputView = Ember.View.extend({
3 3
4 4 classNames: ['output'],
5 5
6   - attributeBindings: ['src', 'title'],
  6 + classNameBindings: ['selected'],
  7 +
  8 + attributeBindings: ['src', 'title', 'elementId'],
7 9
8 10 src:'assets/images/amplifier.png',
9   - title:'output'
  11 + title:'output',
  12 + elementId: 'amplifier',
  13 +
  14 + selected: false,
  15 +
  16 + click: function() {
  17 + this.set('selected', !this.get('selected'));
  18 + if (this.get('selected')) {
  19 + play();
  20 + } else {
  21 + stop();
  22 + }
  23 + }
10 24
11 25 });

0 comments on commit 1b231cb

Please sign in to comment.
Something went wrong with that request. Please try again.