mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Fixing DnD, removing LESS, cleaning code
- Updating DnD to use Sortable instead of draggable/dropppable (updating deps as well). - much simpler logic for DnD - Remove LESS for now since it's a bit yet overkill - fix moveFrame function
This commit is contained in:
@ -137,13 +137,7 @@
|
||||
};
|
||||
|
||||
ns.FrameSheet.prototype.moveFrame = function(originIndex, destinationIndex) {
|
||||
var frameToMove = this.getFrameByIndex(originIndex);
|
||||
this.frames.splice(destinationIndex, 0,frameToMove);
|
||||
|
||||
if(destinationIndex <= originIndex) {
|
||||
originIndex++;
|
||||
}
|
||||
this.removeFrameByIndex(originIndex);
|
||||
this.frames.splice(destinationIndex, 0, this.frames.splice(originIndex, 1)[0]);
|
||||
};
|
||||
|
||||
ns.FrameSheet.prototype.swapFrames = function(indexFrame1, indexFrame2) {
|
||||
|
Reference in New Issue
Block a user