Navigation disables graphics layer handlers.. Bug?

778
1
Jump to solution
11-07-2012 03:54 PM
MoizBhukhiya
New Contributor II
I have a graphics layer and using Navigation toolbar.  I observed weird behaviour.
The moment I activate navigation, it is disabling all sorts of interaction with graphics layer.  I cannot click on any of the graphic (It won't trigger 'onClick' event on clicking it).  It is behaving the same in my app and I was able to reproduce it on the following sample page:

http://help.arcgis.com/en/webapi/javascript/arcgis/samples/graphics_contextmenu/index.html

I tried following commands in console while on the above page:
myNav = new esri.toolbars.Navigation(map) myNav.activate(esri.toolbars.Navigation.PAN);
0 Kudos
1 Solution

Accepted Solutions
MoizBhukhiya
New Contributor II
I have a graphics layer and using Navigation toolbar.  I observed weird behaviour.
The moment I activate navigation, it is disabling all sorts of interaction with graphics layer.  I cannot click on any of the graphic (It won't trigger 'onClick' event on clicking it).  It is behaving the same in my app and I was able to reproduce it on the following sample page:

http://help.arcgis.com/en/webapi/javascript/arcgis/samples/graphics_contextmenu/index.html

I tried following commands in console while on the above page:
myNav = new esri.toolbars.Navigation(map) myNav.activate(esri.toolbars.Navigation.PAN);


I guess activating navigation disables Mouse Events.

Fixed it by enabling Mouse events.

this.activate(esri.toolbars.Navigation.PAN); map.graphics.enableMouseEvents();

View solution in original post

0 Kudos
1 Reply
MoizBhukhiya
New Contributor II
I have a graphics layer and using Navigation toolbar.  I observed weird behaviour.
The moment I activate navigation, it is disabling all sorts of interaction with graphics layer.  I cannot click on any of the graphic (It won't trigger 'onClick' event on clicking it).  It is behaving the same in my app and I was able to reproduce it on the following sample page:

http://help.arcgis.com/en/webapi/javascript/arcgis/samples/graphics_contextmenu/index.html

I tried following commands in console while on the above page:
myNav = new esri.toolbars.Navigation(map) myNav.activate(esri.toolbars.Navigation.PAN);


I guess activating navigation disables Mouse Events.

Fixed it by enabling Mouse events.

this.activate(esri.toolbars.Navigation.PAN); map.graphics.enableMouseEvents();
0 Kudos