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. git-svn-id: http://svn.openlayers.org/trunk/openlayers@3040 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
1 parent
6ffc672436
commit
df65488d3a
3 files changed
+11
-1
No files matched your search
@@ -277,7 +277,8 @@ OpenLayers.Feature.Vector.style = {
|
||||
pointRadius: 6,
|
||||
hoverPointRadius: 1,
|
||||
hoverPointUnit: "%",
|
||||
pointerEvents: "visiblePainted"
|
||||
pointerEvents: "visiblePainted",
|
||||
cursor: "pointer"
|
||||
},
|
||||
'temporary': {
|
||||
fillColor: "yellow",
|
||||
|
||||
@@ -130,6 +130,7 @@ OpenLayers.Renderer.SVG.prototype =
|
||||
style = style || node.olStyle;
|
||||
options = options || node.olOptions;
|
||||
|
||||
|
||||
if (node.geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
|
||||
node.setAttributeNS(null, "r", style.pointRadius);
|
||||
}
|
||||
@@ -152,6 +153,10 @@ OpenLayers.Renderer.SVG.prototype =
|
||||
if (style.pointerEvents) {
|
||||
node.setAttributeNS(null, "pointer-events", style.pointerEvents);
|
||||
}
|
||||
|
||||
if (style.cursor) {
|
||||
node.setAttributeNS(null, "cursor", style.cursor);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,6 +174,10 @@ OpenLayers.Renderer.VML.prototype =
|
||||
}
|
||||
stroke.setAttribute("opacity", style.strokeOpacity);
|
||||
}
|
||||
|
||||
if (style.cursor) {
|
||||
node.style.cursor = style.cursor;
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user