Skip to content

Commit

Permalink
Set Control.TransformFeature handle role (rotate) into attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredj committed Jan 27, 2012
1 parent 717e13f commit 4e73df0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/OpenLayers/Control/TransformFeature.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4e73df0

Please sign in to comment.