huhuang03 / reorderable_grid_view

MIT License
46 stars 33 forks source link

Incorrect calculation of dragged widget offset when grid is not taking whole screen width? #37

Closed Milad-Akarie closed 2 years ago

Milad-Akarie commented 2 years ago

In the attached example I'm using a sidebar/content layout

reorderable_grid_bug The y offset is also incorrect I'm translating the draggable item to fix it

huhuang03 commented 2 years ago

It look like not the reorderable caused issue, because it look like not right before start drag.

Still same if use a normal gridview?

Milad-Akarie commented 2 years ago

@huhuang03 I'm not sure I understand what you mean, it offset is incorrect when the drag starts, normal gridview has no drag feature?

the issue happens when for example you use ReorderableGridView inside of a row like follows

 Row(children: [
      SizedBox(width: 300),
      Expanded(child: ReorderableGridView(...),
  ]);
huhuang03 commented 2 years ago

Sorry for my poor english.

I tried in a row, and it's ok. I have push the demo to the master branch.

Maybe you can try the latest version which is 2.2.3-alpha.4. Or provide a demo.

Thank you.

Milad-Akarie commented 2 years ago

@huhuang03 This happened because of an auto-scale Responsive wrapper I was using.