Mouse clicked

04-18-2018 09:22 PM
Regular Contributor

I noticed something today and wondered if this makes sense or not?

The MapView (Runtime v100.x, or the Map in 10.2.6) both have mouseclicked signals. The docs for 100.x say the following:

Emitted when a mouse click or touch is detected on the GeoView.This signal will only emit if a mouse press and a mouse release happen in the same relative location. This is useful when performing tasks like an identify, where you want to know if a user clicked or tapped on a particular feature.

The key thing here being ' the same relative location...' which doesn't seem to be the case.

A click/tap fires the mouseclicked signal.

A click and drag pans the map as it should.

A press and hold fires the 'mousepressedandheld' signal as it should, but then if I move the mouse all the way across the map (i.e. quite obviously *not* in the same relative location) and release it, then the mouseclicked signal still fires.

I noticed the same behaviour in both runtimes, now that I'm aware of it.

I'm wondering if someone else can confirm the same behaviour? And then if they can, is this a bug or are the docs misleading?

I'm wanting to respond differently depending on whether it was a mouse click or a pressandheld event, so currently I have to do a workaround by setting a custom bool value on pressandheld to ignore the clicked event.



0 Kudos
0 Replies