You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using ng-sortable for a project where I need a card-style layout, where the cards are displayed in a table of multiple rows. My model is an array of arrays. Here is my HTML:
The <ul> elements are styled with display: table and the <li> elements with display: table-cell. I am able to drag the 'cards' to any row or cell position successfully but when I do placeholder elements are displayed for all cards in the target row rather than just for the card being moved. The other cards are still display but are pushed down. When I release the click the move completes successfully and all the placeholders disappear but the effect of what looks like an empty row of placeholders during the drag doesn't look good.
I've isolated the issue in ng-sortable.js to the functions insertAfter and insertBefore, the first lines of which are:
if (placeHolder.css('display') !== 'table-row') {
placeHolder.css('display', 'block');
}
If I change this to the following the issue goes away and the drag works as it should with only a placeholder being shown for the card being moved:
Hi
I'm using ng-sortable for a project where I need a card-style layout, where the cards are displayed in a table of multiple rows. My model is an array of arrays. Here is my HTML:
The
<ul>
elements are styled withdisplay: table
and the<li>
elements withdisplay: table-cell
. I am able to drag the 'cards' to any row or cell position successfully but when I do placeholder elements are displayed for all cards in the target row rather than just for the card being moved. The other cards are still display but are pushed down. When I release the click the move completes successfully and all the placeholders disappear but the effect of what looks like an empty row of placeholders during the drag doesn't look good.I've isolated the issue in ng-sortable.js to the functions
insertAfter
andinsertBefore
, the first lines of which are:If I change this to the following the issue goes away and the drag works as it should with only a placeholder being shown for the card being moved:
So is this a legitimate fix (i.e. one that its worth submitting a pull request for) or will it cause issues elsewhere?
Thanks
The text was updated successfully, but these errors were encountered: