bug fixes

This commit is contained in:
Egor 2015-10-09 00:36:46 -07:00
parent 4cf9fd1566
commit c19419da2b
5 changed files with 12 additions and 6 deletions

View file

@ -138,8 +138,10 @@ export default Em.Component.extend({
};
Em.$.get(this.get('apiURL') + '/lights', function (result, status) {
if (status === 'success' && JSON.stringify(self.get('lightsData')) !== JSON.stringify(result) ) {
if (status === 'success' && Em.isNone(result[0])) {
self.set('lightsData', result);
} else {
fail();
}
}).fail(fail);
},

View file

@ -453,12 +453,12 @@ export default Em.Component.extend(musicControlMixin, visualizerMixin, {
light;
if(randomTransition) {
lightBopIndex = Math.floor(Math.random() * activeLights.length) + 1;
lightBopIndex = Math.floor(Math.random() * activeLights.length);
// let's try not to select the same light twice in a row
if(activeLights.length > 1) {
while(lightBopIndex === lastLightBopIndex) {
lightBopIndex = Math.floor(Math.random() * activeLights.length) + 1;
lightBopIndex = Math.floor(Math.random() * activeLights.length);
}
}
} else {

View file

@ -257,7 +257,7 @@ export default Em.Mixin.create({
this.$('#dimmer').fadeTo(400, opacity, function() {
if(opacity === 0) {
$(this).hide();
Em.$(this).hide();
}
});
}.observes('dimmerOn'),

View file

@ -405,7 +405,7 @@ md-toolbar {
#slideToggle {
color: $playerDefaultIconColor;
background: #8C3E3E;
background: #730B07;
div md-icon {
color: inherit !important;
}
@ -967,3 +967,7 @@ $vibrateblurouter: 2px;
color: #F12B24 !important;
font-size: 30px;
}
.md-warn {
background: $secondaryThemeColor;
}

View file

@ -15,7 +15,7 @@
"jquery": "~2.1.4",
"jquery-mousewheel": "~3.1.13",
"loader.js": "ember-cli/loader.js#3.2.0",
"locallyjs": "~0.3.1",
"locallyjs": "~0.3.2",
"matchMedia": "~0.2.0",
"nouislider": "^8.0.1",
"qunit": "~1.18.0",