[OpenLayers-Trac] [OpenLayers] #1484: better cursor support for controls

OpenLayers trac at openlayers.org
Thu Apr 3 08:20:10 EDT 2008


#1484: better cursor support for controls
---------------------+------------------------------------------------------
 Reporter:  bartvde  |       Owner:             
     Type:  feature  |      Status:  new        
 Priority:  minor    |   Milestone:  2.7 Release
Component:  Control  |     Version:  2.6 RC1    
 Keywords:           |       State:             
---------------------+------------------------------------------------------
 I want to start working on better cursor support for OL controls.
 Currently a lot of the cursors are hard-coded in javascript, without any
 way to override them.

 I am doubting a bit between having control API properties, or doing this
 completely with css classes. I tend to be in favour of the API properties,
 since if we autogenerate css class names (ofcourse we could also work out
 something similar to displayClass, e.g. cursorClass), we will run into
 trouble with e.g. the ZoomBox Control, for which people will want a
 different cursor if out=true. With API Properties they will be able to do
 that.

 When the tool is activated, the cursor on the map should be cursor X. But
 also in some cases people want the cursor to change on mouse down to
 cursor Y, for instance the pan hand in Google maps changes to a move
 cursor on mouse down. Also APIProperties will make it easier since we
 don't need a removeClass and addClass method for adding/removing css
 classes to the map div.

 Initial proposal for APIProperties:
 -cursor
 -mousedownCursor

 which would be set on the map div (this.map.div.style.cursor).

 Thoughts welcome before I start my implementation. Especially with the
 decision to use css classes or to use API Properties for the cursor. TIA.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/1484>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list