I am having trouble creating a jsui object that works correctly when the object has a different size in patch mode than in presentation mode.
I am using relative coordinates and sketch.screentoworld(x,y) to get click points. However, it seems that sketch.screentoworld() always uses the patch rectangle for it's transformation and not the presentation rectangle. So when clicking on the corners in patch mode, you get correct -1. to 1. range for the corners of the object, but when switching to presentation mode, the range seems to be related to the size of the patching rect, and not the new presentation rect.
How are we supposed to handle this situation?
Note: This is reproducible with the C74 example mgraphics-hittest patch.