DropObject coordinates issue

  1. 3 days ago
    Edited 3 days ago

    I want to use drag & drop in a web app to move a webrectangle around inside a webcontainer.
    Very simply, I use the DropObject event on the container to set the rectangle's new coordinates by assigning the DropObject x & y data to Obj.Sender.Left / Top properties.

    This all works fine and pretty much as expected - except...

    Almost every attempt to drag the rectangle by "a small amount" (maybe < 10px ??) results in bizarre drop coordinates. The rectangle mostly shoots off towards top left corner of the container.

    I also setup a text area into which I log the DropObject data for every drop. The Obj.OriginX (&Y) figures logged never seem to correspond to anything logical. The DropObject x & y coordinates mostly appear realistic - except (as noted above) when the move is for a very small movement - in which case the x & y data is nonsense - sometimes negative!

    Is it me, or is it a bug?

    Xojo 2019r1.1 / Windows 10 / Chrome browser

  2. 2 days ago

    Here is a little video demo to show the problem...

    [url=https://youtu.be/3CLTkG8hy8M]link text[/Youtube video link]

  3. Ok, I have figured out the Origin X/Y coordinates. Actually, very useful. They represent the location of the mouse pointer relative to the object that is being dragged (in my the Rectangle). I had incorrectly thought the Origin related to the starting position of the Rectangle relative to its container.

    Anyway, I am still trying to figure out why I get crazy drop coordinates whenever I drag the rectangle by very small amounts...

or Sign Up to reply!