Skip to content

Commit dc90581

Browse files
committed
Split the Global State Manager code up into single files and added in ability to move States up, down and to the top. Also swap position and extra index accessing methods.
1 parent dc5bccc commit dc90581

36 files changed

Lines changed: 873 additions & 612 deletions

v3/src/plugins/StateManager.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,26 @@ var StateManager = new Class({
6464
manager.swap(this.key, action.key);
6565
break;
6666

67+
case 'moveUp':
68+
manager.moveUp(this.key);
69+
break;
70+
71+
case 'moveDown':
72+
manager.moveDown(this.key);
73+
break;
74+
75+
case 'bringToTop':
76+
manager.bringToTop(this.key);
77+
break;
78+
79+
case 'sendToBack':
80+
manager.sendToBack(this.key);
81+
break;
82+
83+
case 'swapPosition':
84+
manager.swapPosition(this.key, action.key);
85+
break;
86+
6787
case 'sleep':
6888
manager.sleep(action.key);
6989
break;
@@ -158,6 +178,11 @@ var StateManager = new Class({
158178
return this;
159179
},
160180

181+
swapPosition: function (key)
182+
{
183+
this._queue.push({ type: 'swapPosition', key: key });
184+
},
185+
161186
moveUp: function ()
162187
{
163188
this._queue.push({ type: 'moveUp' });

0 commit comments

Comments
 (0)