Skip to content

Commit

Permalink
Fix list_alignment live refresh drag direction
Browse files Browse the repository at this point in the history
  • Loading branch information
sixem committed May 11, 2021
1 parent 8015245 commit 0b3a366
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions src/indexer/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,21 +438,10 @@
'body > div.gallery-container > div.content-container > div.list > div.drag'
];

elements.forEach((e) =>
{
alignment === 0 ? $(e).removeClass('reversed') : $(e).addClass('reversed')
});

var detached = $(elements[1]).detach();

var media = ('body > div.gallery-container > div.content-container > div.media');

detached[alignment === 1 ? 'insertBefore' : 'insertAfter'](media);

if((main.gallery.instance).store.list.reverse)
{
alignment === 0 ? false : true
}
elements.forEach((e) => alignment === 0 ? $(e).removeClass('reversed') : $(e).addClass('reversed'));
var detached = $(elements[1]).detach(), media = ('body > div.gallery-container > div.content-container > div.media');
alignment === 1 ? detached.insertBefore(media) : detached.insertAfter(media);
(main.gallery.instance).store.list.reverse = (alignment === 0 ? false : true);
}
},
reverse_options : (value) =>
Expand Down

0 comments on commit 0b3a366

Please sign in to comment.