OpenLayers OpenLayers

Changeset 3040

Show
Ignore:
Timestamp:
04/10/07 06:19:13 (2 years ago)
Author:
crschmidt
Message:

Commit #637, "add cursor property in Feature.Vector" from pgiraud, with
minor modification: because features by default do nothing at all, change
the default cursor property (keep it at null) so that users aren't confused
when clicking has no affect. Thanks for the patch.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Feature/Vector.js

    r2971 r3040  
    278278        hoverPointRadius: 1, 
    279279        hoverPointUnit: "%", 
    280         pointerEvents: "visiblePainted" 
     280        pointerEvents: "visiblePainted", 
     281        cursor: "pointer" 
    281282    }, 
    282283    'temporary': { 
  • trunk/openlayers/lib/OpenLayers/Renderer/SVG.js

    r2969 r3040  
    131131        options = options || node.olOptions; 
    132132 
     133 
    133134        if (node.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") { 
    134135            node.setAttributeNS(null, "r", style.pointRadius); 
     
    152153        if (style.pointerEvents) { 
    153154            node.setAttributeNS(null, "pointer-events", style.pointerEvents); 
     155        } 
     156         
     157        if (style.cursor) { 
     158            node.setAttributeNS(null, "cursor", style.cursor); 
    154159        } 
    155160    }, 
  • trunk/openlayers/lib/OpenLayers/Renderer/VML.js

    r2959 r3040  
    175175            stroke.setAttribute("opacity", style.strokeOpacity); 
    176176        } 
     177         
     178        if (style.cursor) { 
     179            node.style.cursor = style.cursor; 
     180        } 
    177181    }, 
    178182