mirror of
https://github.com/BorysLevytskyi/BitwiseCmd.git
synced 2025-12-23 21:22:48 +01:00
Implemented indicators
This commit is contained in:
@@ -79,11 +79,15 @@ app.compose(function() {
|
||||
|
||||
app.controller('configPanelCtrl', {
|
||||
onViewAttached: function (){
|
||||
var chk = this.viewElement.querySelector('#displayBytes');
|
||||
chk.checked = app.emphasizeBytes;
|
||||
chk.addEventListener('change', function(evt){
|
||||
app.emphasizeBytes = evt.srcElement.checked === true;
|
||||
})
|
||||
var self = this;
|
||||
self.update();
|
||||
app.cmdConfig.observe(function(){
|
||||
self.update();
|
||||
});
|
||||
},
|
||||
update: function () {
|
||||
var emIndicator = this.viewElement.querySelector('#emphasizeBytes');
|
||||
emIndicator.style.display = app.cmdConfig.emphasizeBytes ? '' : 'none';
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user