Add cmd interface

Code refactoring
This commit is contained in:
RainLoop Team 2016-08-24 01:17:50 +03:00
parent e6e1a19477
commit 962391e2a0
23 changed files with 180 additions and 223 deletions

View file

@ -76,33 +76,8 @@ class Selector
}, this);
this.selectedItem = this.selectedItem.extend({toggleSubscribe: [null,
(prev) => {
if (prev)
{
prev.selected(false);
}
}, (next) => {
if (next)
{
next.selected(true);
}
}
]});
this.focusedItem = this.focusedItem.extend({toggleSubscribe: [null,
(prev) => {
if (prev)
{
prev.focused(false);
}
}, (next) => {
if (next)
{
next.focused(true);
}
}
]});
this.selectedItem = this.selectedItem.extend({toggleSubscribeProperty: [this, 'selected']});
this.focusedItem = this.focusedItem.extend({toggleSubscribeProperty: [null, 'focused']});
this.iSelectNextHelper = 0;
this.iFocusedNextHelper = 0;