Ticket #2598 (closed feature: fixed)

Opened 3 years ago

Last modified 17 months ago

Irregular transformation support for TransformControl

Reported by: tomh Owned by: ahocevar
Priority: minor Milestone: 2.12 Release
Component: Control.TransformFeature Version: 2.9
Keywords: Cc: tom@…
State: Complete

Description

There doesn't seem to be a component for Control.TransformControl yet so I'm raising this against Control instead...

Currently all the transformations done by the TransformControl are symmetrical about the centre. The attached patch adds an "irregular" option (to parallel the option of the same name in the RegularPolygon handler used for drawing features) that allows each edge/corner to be dragged independently to resize a feature.

Attachments

irregular-transform.patch Download (7.2 KB) - added by tomh 19 months ago.
Updated patch which works with rotated features and has tests

Change History

Changed 2 years ago by tomh

  • state set to Review

Changed 2 years ago by ahocevar

  • state changed from Review to Needs More Work

Can you please add unit tests and a bit more docs for the new irregular option?

Changed 2 years ago by tomh

  • cc tom@… added

Changed 20 months ago by tomh

  • owner set to ahocevar
  • component changed from Control to Control.TransformFeature

Changed 20 months ago by rdewit

This patch does not work for the left geometry (45 degree rotation preset) in the transform-feature example (add 'irregular: true' to the control options). The feature moves around. It seems to do the job for the right feature.

Changed 19 months ago by tomh

Updated patch which works with rotated features and has tests

Changed 19 months ago by tomh

  • state changed from Needs More Work to Review

I have fixed the problem with resizing of rotated features and added some tests and documentation for the irregular flag.

In addition to the attached patch, the changes are available in my git tree at:

 https://github.com/tomhughes/openlayers/tree/ticket-2598

Changed 17 months ago by ahocevar

  • status changed from new to closed
  • state changed from Review to Complete
  • resolution set to fixed
Note: See TracTickets for help on using tickets.