toggle active lights
This commit is contained in:
parent
3742771e4e
commit
38f101665b
2 changed files with 15 additions and 3 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Reference in a new issue