This commit fixes this: once a feature's been selected the "pointer" cursor is

always used when going over it. r=crschmidt (closes #1217)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5909 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Éric Lemoine
2008-01-27 14:26:28 +00:00
parent 5f3e05bb5e
commit bd07adbb10
3 changed files with 7 additions and 4 deletions
+5 -2
View File
@@ -279,6 +279,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
* - hoverPointRadius: 1, * - hoverPointRadius: 1,
* - hoverPointUnit: "%", * - hoverPointUnit: "%",
* - pointerEvents: "visiblePainted" * - pointerEvents: "visiblePainted"
* - cursor: ""
* *
* Other style properties that have no default values: * Other style properties that have no default values:
* *
@@ -306,7 +307,8 @@ OpenLayers.Feature.Vector.style = {
pointRadius: 6, pointRadius: 6,
hoverPointRadius: 1, hoverPointRadius: 1,
hoverPointUnit: "%", hoverPointUnit: "%",
pointerEvents: "visiblePainted" pointerEvents: "visiblePainted",
cursor: ""
}, },
'select': { 'select': {
fillColor: "blue", fillColor: "blue",
@@ -341,6 +343,7 @@ OpenLayers.Feature.Vector.style = {
pointRadius: 6, pointRadius: 6,
hoverPointRadius: 1, hoverPointRadius: 1,
hoverPointUnit: "%", hoverPointUnit: "%",
pointerEvents: "visiblePainted" pointerEvents: "visiblePainted",
cursor: ""
} }
}; };
+1 -1
View File
@@ -241,7 +241,7 @@ OpenLayers.Renderer.SVG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
node.setAttributeNS(null, "pointer-events", style.pointerEvents); node.setAttributeNS(null, "pointer-events", style.pointerEvents);
} }
if (style.cursor) { if (style.cursor != null) {
node.setAttributeNS(null, "cursor", style.cursor); node.setAttributeNS(null, "cursor", style.cursor);
} }
return node; return node;
+1 -1
View File
@@ -246,7 +246,7 @@ OpenLayers.Renderer.VML = OpenLayers.Class(OpenLayers.Renderer.Elements, {
stroke.setAttribute("endcap", !style.strokeLinecap || style.strokeLinecap == 'butt' ? 'flat' : style.strokeLinecap); stroke.setAttribute("endcap", !style.strokeLinecap || style.strokeLinecap == 'butt' ? 'flat' : style.strokeLinecap);
} }
if (style.cursor) { if (style.cursor != null) {
node.style.cursor = style.cursor; node.style.cursor = style.cursor;
} }
return node; return node;