Created
July 24, 2013 19:00
-
-
Save iksnae/6073444 to your computer and use it in GitHub Desktop.
mb shifting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var moodboards_order_array = []; | |
function onMoveMoodboardUp(mb_index) | |
{ | |
switch(getMoodboardFilteringMode()) | |
{ | |
case true: | |
// shift filtered | |
shiftMoodBoardsFiltered(mb_index,-1); | |
break; | |
case false: | |
// shift unfiltered | |
shiftMoodBoardsFiltered(mb_index,-1); | |
break; | |
} | |
} | |
function shiftMoodBoardsFiltered(index,direction) | |
{ | |
var to = index+direction; | |
var from = index; | |
// TODO: account for inactive. | |
moodboards_order_array.splice(to, 0, this.splice(from, 1)[0]); | |
} | |
function shiftMoodBoardsUnfiltered(index,direction) | |
{ | |
var to = index+direction; | |
var from = index; | |
moodboards_order_array.splice(to, 0, this.splice(from, 1)[0]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment