Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Moving a group seems to disregard locationObjectName

$
0
0

@david0 wrote:

When I call the move method on a group, it seems to calculate its rendered position differently than how it was calculated for the initial layout.

As a simple test, I would expect the following to be a no-op:

let loc = go.Point.parse(group.data.loc);
group.move(new go.Point(loc.x, loc.y));

But that causes the rendered position of the group to shift on the canvas.

This is a group deriving from "Spot", and I suspect move is not honoring locationObjectName and instead blindly calculating based on the group bounding box.

Full example here: http://jsfiddle.net/Leca70eg/2/

When you click the button, the group shifts its rendered location, while I would have expected the group to stay put.

Is this expected behavior? Is there a way I can get move to do the same logic as what happens during the initial layout?

Posts: 9

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles