Reply To: Track Mouse Position

PennController for IBEX Forums Requests Track Mouse Position Reply To: Track Mouse Position


Hi! I am relatively new to Pcibex and am trying to do the following: log coordinate location of images (between 2 and 5 depending on set randomization) that are dragged and dropped to another canvas. The figures can be placed anywhere and in any order on the new canvas. I’d really like to record where they place each figure. I’ve been able to implement the above approach and collect coordinate data, but the method fails when I try to drag and drop (probably because the images are “clicked” in one place and “unclicked” in another). Is there a better way to do this? Thanks so much!

Drag and drop sample approach:

    newCanvas("figlist", "72vw","58vh")
        .print("left at 5vw", "middle at 50vh")
    newCanvas("grid", "72vw", "58vh")
        .css("padding", "1em")
        .print("left at 20vw", "middle at 50vh")
    newImage("man", "man_small.png").selector("figures").print(getCanvas("figlist")),
    newImage("boy", "boy_small.png").selector("figures").print(getCanvas("figlist"))

Thanks for any help!