[OpenLayers-Users] Re: rectangle - resize from one corner whilst
opposite is fixed
Roald de Wit
list at rdewit.net
Fri Sep 23 19:33:02 EDT 2011
Hi Andy,
There exists a TransFormFeature control [1] (example: [2]) and somebody
has created a patch that attempts to do what you want [3]. If you're
brave, you can apply this patch to your own OL code and create the
control like this:
control = new
OpenLayers.Control.TransformFeature(vectorLayer, {
renderIntent: "transform",
*irregular: true*
});
Having said that, the patch seems to be not ready yet and your mileage
may vary.
Slightly off-topic question for the OL developers: I wonder why there is
a ModifyFeature control as well as a TransformFeature control. To me
they seem to have some overlap. Shouldn't we just have one control to
rule them both?
Regards, Roald
[1]
http://dev.openlayers.org/apidocs/files/OpenLayers/Control/TransformFeature-js.html
[2] http://openlayers.org/dev/examples/transform-feature.html
[3] http://trac.osgeo.org/openlayers/ticket/2598
On 24/09/11 00:10, AndyT wrote:
> Hi,
>
> Just following up on my request from a year ago and wondering whether any
> one has had cause to implement an resizeable rectangle whereby the it can be
> enlarged in just one direction. That is to say that an ortho aligned
> rectangle can be enlarged just by dragging it's western extent without
> affecting the eastern extent. At the moment, such an edit results in the
> rectangle expanding both west and east.
>
> Thanks in advance for any responses...
>
> Andy
>
>
>
> AndyT wrote:
>> Hi,
>>
>> Hopefully i didn't miss this one elsewhere in the forums....
>>
>> At the moment our resizing of a rectangle means that if i drag one corner
>> outwards then the opposite corner moves out in the other direction.
>>
>> For practical purposes, it would be good (as an example) to move my
>> rectangle so the top left corner is where i want it and i can drag the
>> bottom right to the overall coverage i need.
>>
>> At the moment, to do this i would get the box so the top left is close,
>> drag out the bottom right, move so top left closer again and do this as a
>> loop until i had the rectangle close enough.
>>
>> What would be even better is to be able to drag any of the four corners
>> whilst the opposite corner stays fixed.
>>
>> Anyone done this before? Apologies again if i'm missing the obvious
>>
>> Thanks
>>
>> Andy
>>
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/rectangle-resize-from-one-corner-whilst-opposite-is-fixed-tp5045810p6824363.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list