How to change cursor on the map when using SketchViewModel

266
2
08-22-2019 01:35 PM
BradBarnell
New Contributor III

Is there any way to change the mouse cursor on the map after activating the SketchViewModel in the latest version of the javascript API?  I tried doing it with css with no luck.

viewDiv.style.cursor = "default";

Tags (2)
2 Replies
BenElan
Esri Contributor

In vanilla JavaScript it would be

document.getElementById("viewDiv").style.cursor = "default";

If that doesn't work you could try using jQuery

$('#viewDiv').css( 'cursor', 'default' );‍‍‍‍‍‍

jQuery CDN:

<script src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
</script>
‍‍‍‍‍‍
0 Kudos
BradBarnell
New Contributor III

@Ben Elan - ESRI support says this is not possible without downloading the API javascript and hacking it, so I have given up on doing this.

0 Kudos