Image shrinks when dragged how to fix

There are two cells with different aspect ratios. The image is compressed when dragged, looks compressed. How do I fix this problem?

What are you piping in as Drag Visual?

There are many ways to address / fix that. It really depends on the approach you’ve taken so far. By default, the drag OP will use Desired Size, which is normally dictated by the container’s constrains; once dragged, those constrains are no longer in place and whatever default desired size is requested, those values will be used.

You have options:

  • set the desired size of the image
  • wrap things with a size box and override W/H
  • or, as the friendly tooltip suggests, create a widget that represents the dragged element:

353249-screenshot-2.png

This way you get to control the behaviour of the dragged item that is detached from what the payload is. Perhaps there will be an animation or some logic that payload does not need to know about, no need to clutter it. The bells and whistles can be handled by the Dragged Visual widget.