Skip to content

Commit

Permalink
[xprototype#4/feature] Reorder the other actions in actionOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
wilcorrea committed Mar 28, 2019
1 parent 258068f commit 8428502
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/Prototype/Prototype/Action.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ export default {
*/
actionOrder (order) {
const id = this.__currentAction
Object.keys(this.__actions).forEach((key) => {
if (key === this.__currentAction) {
return
}
const action = this.__actions[key]
if (action.order < order) {
return
}
action.order = action.order + 1
})
if (this.__actions[id]) {
this.__actions[id].order = order
}
Expand Down

0 comments on commit 8428502

Please sign in to comment.