Select to view content in your preferred language

MapControl: [shift] + drag rectangle. Any way to surpress?

284
6
Jump to solution
06-27-2024 01:17 PM
Mike_Quetel
Occasional Contributor

A user brought this behavior to my attention recently, and I'm not sure when this was incorporated into the map control.  The combination of holding down the shift button and dragging a rectangle performs a zoom-in which I am struggling to suppress.  I used to take advantage of this combination for adding/removing either selected features or graphics... and this behavior now overrides everything else, seemingly to include the editor.   Do I have any options here?  MapViewInteractionOptions doesn't appear to have anything granular besides stopping any zoom in capability...

1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Just dug in deeper and see the issue now. It's actually a bug-fix that was made. We didn't want the editor to continue reacting to mouse move when you're using key-combinations like shift. That means it'll fall through to the default zooming mode, so you can edit your geometry, but if you need to zoom in closer, you can still do the zoombox interaction.

View solution in original post

0 Kudos
6 Replies
dotMorten_esri
Esri Notable Contributor

The feature isn't new. It's been there in every release, dating all the way back to the old Silverlight days.


If you're using WPF, you can use the PreviewMouseMove event and set e.Handled=true if the shift key is down to take over control.

Mike_Quetel
Occasional Contributor

Is it possible that the old SketchEditor suppressed it and the new editor doesn't?  That's my theory.

 

dotMorten_esri
Esri Notable Contributor

Just dug in deeper and see the issue now. It's actually a bug-fix that was made. We didn't want the editor to continue reacting to mouse move when you're using key-combinations like shift. That means it'll fall through to the default zooming mode, so you can edit your geometry, but if you need to zoom in closer, you can still do the zoombox interaction.

0 Kudos
Mike_Quetel
Occasional Contributor

OK thanks... at least I haven't completely lost my mind!  I think rather than fighting the shift button combo, I'm just going to move over to using the ctrl button to signal that the user wants to modify an existing map selection vs create a new one.  There's value to not overriding the zoom-in functionality 

0 Kudos
dotMorten_esri
Esri Notable Contributor

Sounds like a good idea. It did get us started to think about an easier way to remap/remove all key combinations and add custom key combos as well to make scenarios like this easier.

Mike_Quetel
Occasional Contributor

It would be really welcome to have more fine-grained control over these actions, to support specialized use cases.  Appreciate your feedback!

0 Kudos