From 4e73df011534d4f499b31c020bffa178a932e066 Mon Sep 17 00:00:00 2001 From: fredj Date: Fri, 27 Jan 2012 11:41:45 +0100 Subject: [PATCH] Set Control.TransformFeature handle role (rotate) into attributes. --- lib/OpenLayers/Control/TransformFeature.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Control/TransformFeature.js b/lib/OpenLayers/Control/TransformFeature.js index 66b441846e..2b719a4450 100644 --- a/lib/OpenLayers/Control/TransformFeature.js +++ b/lib/OpenLayers/Control/TransformFeature.js @@ -465,17 +465,17 @@ OpenLayers.Control.TransformFeature = OpenLayers.Class(OpenLayers.Control, { var handles = new Array(8); var rotationHandles = new Array(4); var geom, handle, rotationHandle; - var resize = ["sw-resize", "s-resize", "se-resize", "e-resize", - "ne-resize", "n-resize", "nw-resize", "w-resize"]; + var positions = ["sw", "s", "se", "e", "ne", "n", "nw", "w"]; for(var i=0; i<8; ++i) { geom = this.box.geometry.components[i]; handle = new OpenLayers.Feature.Vector(geom.clone(), { - role: resize[i] + role: positions[i] + "-resize" }, typeof this.renderIntent == "string" ? null : this.renderIntent); if(i % 2 == 0) { - rotationHandle = new OpenLayers.Feature.Vector(geom.clone(), - null, typeof this.rotationHandleSymbolizer == "string" ? + rotationHandle = new OpenLayers.Feature.Vector(geom.clone(), { + role: positions[i] + "-rotate" + }, typeof this.rotationHandleSymbolizer == "string" ? null : this.rotationHandleSymbolizer); rotationHandle.geometry.move = rotationHandleMoveFn; geom._rotationHandle = rotationHandle;