Disable snapping tools
Is there a way to make the snapping tools in the FindDataControlRegion either not appear or gray out when there are no feature layers in the viewer that support snapping? It doesn't make sense to have the snapping tools available when you activate an identify tool if there are no layers the user can snap to.
0
-
Hi John
Did you get an answer to this?0 -
I was able to remove the snapping tools by removing the SnappingLayerSelectorViewModel from the viewModels in the LayerSelector view. That removes the snapping tools from the Identify tools, but not from markups or measurements.
There's probably a way to remove them too, but that's a lot of manual work to remove tools that don't do anything in the viewer when there are no layers to snap to.0 -
Thanks John
What I ended editing the desktop json file for the viewer (\Sites\Viewername\Viewers\NatureMaps\VirtualDirectory\Resources\Config\Default) and made the changes below. This hid the snapping options from the Identify button in the compact toolbar.
{
"id": "FindDataSnappingToggle",
"type": "toggleButton",
"tooltip": "@language-toolbar-identify-snapping-tooltip",
"iconUri": "Resources/Images/Icons/Toolbar/snapping-24.png",
"toggleStateName": "SnappingState",
"toggleOn": {
"name": "@language-toolbar-snapping-enable",
"command": "ActivateSnapping",
"tooltip": "@language-toolbar-snapping-alt-enable",
"hideOnDisable": true
},
{
"id": "FindDataSelectSnappingLayersButton",
"type": "button",
"iconUri": "Resources/Images/Icons/Toolbar/layers-snapping-24.png",
"command": "ActivateSelectLayersForSnapping",
"commandParameter": null,
"hideOnDisable": true,
"name": "@language-toolbar-snapping-select-layers",
"tooltip": "@language-toolbar-snapping-select-layers-tooltip"
},0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare