Select to view content in your preferred language

EditWidget - remove hand/pan cursor when widget is closed

678
1
07-06-2011 08:32 AM
philippschnetzer
Frequent Contributor
When a widget is closed the cursor remains a pointer.  But when the EditWidget is closed it turns into a pan hand cursor.  I am trying to change the EditWidget to keep the pointer cursor when closed.  So, I added this code to the widgetClosedHandler:
setMapNavigation(null, null);

...but this did not work.
I noticed the widgetClosedhandler also calls a function - deactivateEditor(); - which if it is removed the cursor remains a pointer.  However, this function is necessary for the widget to work properly.  So, I also added the above code to the deactivateEditor() function - still did not work.

Also tried
CursorManager.removeAllCursors();
...still did not work.  Why does the EditWidget seem to override this code?  I need to make this work because once the EditWidget is closed the popups dont seem to work well with my editable point layer using the pan/hand cursor...
Tags (2)
0 Kudos
1 Reply
philippschnetzer
Frequent Contributor
Solved this by changing the pointer to a new pointer based on an image I placed in assets/images folder:

[Embed(source="/../src/assets/images/pointer.png")]
    var pointerCursor:Class;     
    CursorManager.setCursor(pointerCursor, 0, 0, 0 );

   
Not ideal but it works....
0 Kudos