toggle active lights

This commit is contained in:
lone-cloud 2015-09-23 23:00:57 -07:00
parent 3742771e4e
commit 38f101665b
2 changed files with 15 additions and 3 deletions

View file

@ -13,9 +13,16 @@ export default Em.Component.extend({
colorPickerDisplayed: false,
actions: {
clickLight: function(){
console.log('clickLight');
},
clickLight: function(light){
var activeLights = this.get('activeLights'),
lightId = activeLights.indexOf(light);
if(lightId !== -1){
delete activeLights[lightId];
} else {
activeLights.pushObject(light);
}
},
toggleColorpicker: function() {
this.toggleProperty('colorPickerDisplayed');
}

View file

@ -183,6 +183,11 @@ md-list-item .md-no-style {
text-decoration: underline;
}
#lightControl {
max-width: 500px;
margin: auto;
}
.color {
border: 1px solid rgba(0, 0, 0, 0.5);
}