[OpenLayers-Users] Cursor style on control activation

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Jan 14 03:27:45 EST 2010


If you use Firefox and Firebug, you can select the map's div node,
and see what css classes are applied.
When you drag an item,
you can see that the css classes for the div change.

Using this method you can both get the answer to your question,
and debug issues with cursors (and styles in general).

What class name is actually applied depends on what control you are using.

The ZoomBox uses this classname:
"displayclass" + Active.olDrawBox

Where the pan tool uses this name:
"displayclass" + Active.olDragDown

Regards, Kenneth Skovhede, GEOGRAF A/S

On 14-01-2010 01:46, Richard Greenwood wrote:
> On Mon, Jan 11, 2010 at 11:58 AM,<bartvde at osgis.nl>  wrote:
>    
>> IIRC the syntax is:
>>
>> .olControlZoomBoxActive {
>>   cursor: pointer;
>> }
>>
>> etc. so displayClass plus Active.
>>
>> Bart
>>      
> Bart,
>
> Your post was very helpful. Thank you. I have one additional question
> - using displayClass plus Active correctly sets the cursor until the
> user begins dragging, at which point the cursor changes back to the
> default. Is there a way to retain the custom cursor while it is being
> dragged?
>
> Thanks,
>    



More information about the Users mailing list