Problem using GeometryReshapingTool and rotate together

I´m using GeometryReshapingTool and rotate together in my project and the reshape goes “crazy”. I thought that it´s my project problem but I put the rotate enable in this example : Geometry Reshaping
and this is the result:

With 0º the reshape is correct but with 90º this is the result:

The reshape goes to the opposite direcction.

I tried to quit the normalize method from GeometryReshapingTool but in my project i have ports like in pipes example and i doesn´t work correctly.

The PolygonDrawing extension/sample already supports reshaping and rotating: Polygon Drawing Tool. I don’t see any problem there. Or am I misunderstanding what the problem is?

The locationSpot in my project is topleft.

In the example Polygon Drawing Tool when you reshape to right the shape goes to the left. I need a “static” shape when we use the reshape. Like Geometry Reshaping

Yes, I guess the GeometryReshapingTool doesn’t support general rotation.

You can improve the situation by changing the implementation of GeometryReshapingTool.reshape in extensions/GeometryReshapingTool.js (or extensionsTS.GeometryReshapingTool.ts) to include:

  . . .
  var part = shape.part;  // move the Part holding the Shape
  if (!part.locationSpot.equals(go.Spot.Center)) {  // but only if the locationSpot isn't Center
  this.updateAdornments(part);  // update any Adornments of the Part
  . . .
1 Like

Oh, thats works, thank you for everything