Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2 drop shadows when drag large widget between grids #393

Closed
troolee opened this issue Mar 8, 2016 · 12 comments · Fixed by #1652
Closed

2 drop shadows when drag large widget between grids #393

troolee opened this issue Mar 8, 2016 · 12 comments · Fixed by #1652
Labels

Comments

@troolee
Copy link
Member

troolee commented Mar 8, 2016

There is a bug while dragging between two grids: http://take.ms/maoFv

@eagoo
Copy link

eagoo commented Apr 13, 2016

would u like fix this bug first?

@eagoo
Copy link

eagoo commented Apr 24, 2016

   var dragOrResize = function(event, ui) {
             ...
                var n = el.data('_gridstack_node');

                //add if widget had been added to outer grid
                if (x < 0 || x >= self.grid.width || y < 0 || (n && n._added)) {

@eagoo
Copy link

eagoo commented Apr 24, 2016

#435

@radiolips radiolips modified the milestones: v0.3.0, v1.0.0 May 12, 2018
@radiolips radiolips changed the title Drag between grids issue Drag large widget between grids issue May 12, 2018
@adumesny
Copy link
Member

adumesny commented Nov 18, 2019

that issue shown in the video with large items is still there in 0.5.2-dev latest build (2 drop shadow showing, with one phantom left behind on drop). Might be time to revisit remainder of #435

Seems like we may want to use the mouse cursor position as hint of where it goes rather than box size (showing 2 possible spots with only one winning really).

@adumesny adumesny changed the title Drag large widget between grids issue Drag large widget between grids issue - 2 drop shadows Apr 13, 2020
@SolarEclipz
Copy link

SolarEclipz commented Apr 15, 2020

To add a note on to this, I will receive phantom items with an outline, but when I try and move an item from a Grid below to the one above (or even above to below) the outline disappears and I am not able to put an item in that spot. Almost as if there is an invisible item-placeholder there.

Currently running 1.0.0-dev I believe.

Edit: This is actually happening on the demo linked above, as well on on the two.html on the website. If you follow their steps and try and move the item back into the previous spot, the Y axis extends as if there is an item there, because it thinks there is an item there. Also for a brief split second you can see the outline of the original item placement.

@adumesny adumesny changed the title Drag large widget between grids issue - 2 drop shadows 2 drop shadows when drag large widget between grids Apr 15, 2020
@LudovicF42
Copy link

The problem seems to be still there ?
V1.1.2

@adumesny
Copy link
Member

yes, hasn't been looked at...

@zgilewski
Copy link

Any change to fix that issue in very near future ??

@adumesny
Copy link
Member

adumesny commented Jun 21, 2020

@zgilewski How much is it worth to you? Feel free to contribute time or $ as I'm swamped these days... The original owner haven't addressed it in 4 years now.

@adumesny adumesny removed this from the v1.0.0 milestone Jun 21, 2020
adumesny added a commit to adumesny/gridstack.js that referenced this issue Sep 27, 2020
* fix for gridstack#393 having 2 shadows when dragging long items between 2 grids
* when dragging an item into a grid, we now mark that it was added
for the old grid to detect and temporarly remove the item.

always wanted to fix that...
@adumesny adumesny mentioned this issue Sep 27, 2020
3 tasks
@adumesny
Copy link
Member

finally fixed in 2.0.1

@adumesny
Copy link
Member

adumesny commented Oct 6, 2020

I can still see it sometimes... re-opening

adumesny added a commit to adumesny/gridstack.js that referenced this issue Mar 8, 2021
- fix gridstack#393 gridstack#1612 gridstack#1578
- re-write of the **drag in/out code - fixing 5 years old bug**
1. we now remove item when cursor leaves (`acceptWidgets` case using `dropout` event) or shape is outside (re-using same method) and re-insert on cursor enter (since we only get `dropover` event). Should **not be possible to have 2 placeholders** which confuses the grids.
2. major re-write and cleanup of the drag in/out. Vars have been renamed and fully documented as I couldn't understand the legacy buggy code.
3. removed any over trash delay feedback as I don't see the point and could introduce race conditions.
adumesny added a commit to adumesny/gridstack.js that referenced this issue Mar 8, 2021
- fix gridstack#393 gridstack#1612 gridstack#1578
- re-write of the **drag in/out code - fixing 5 years old bug**
1. we now remove item when cursor leaves (`acceptWidgets` case using `dropout` event) or shape is outside (re-using same method) and re-insert on cursor enter (since we only get `dropover` event). Should **not be possible to have 2 placeholders** which confuses the grids.
2. major re-write and cleanup of the drag in/out. Vars have been renamed and fully documented as I couldn't understand the legacy buggy code.
3. removed any over trash delay feedback as I don't see the point and could introduce race conditions.
@adumesny adumesny mentioned this issue Mar 8, 2021
3 tasks
@adumesny
Copy link
Member

adumesny commented Mar 8, 2021

finally fixed in v4!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants