search
This commit is contained in:
1 parent
10ffe765b0
commit
d42e24be81
10 files changed
+350
-394
No files matched your search
@@ -190,6 +190,18 @@ Item {
|
||||
root.turn = root.targetStep;
|
||||
}
|
||||
|
||||
// Turn to the window at this list index, the short way round.
|
||||
function selectIndex(index: int): void {
|
||||
if (root.count === 0 || index < 0 || index >= root.count)
|
||||
return;
|
||||
let delta = index - root.selectedIndex;
|
||||
if (delta > root.count / 2)
|
||||
delta -= root.count;
|
||||
else if (delta < -root.count / 2)
|
||||
delta += root.count;
|
||||
root.step(delta);
|
||||
}
|
||||
|
||||
function activateAt(index: int): void {
|
||||
const list = root.windows;
|
||||
if (index < 0 || index >= list.length)
|
||||
|
||||
Reference in new issue
Block a user