I am using a parameter to allow manually editing group rotation angle, when an angle has been set, moving the affected shape/group causes the height to at least 3x it's original size and width to fluctuate up and down. Also, when a shape has been rotated, the selector doesn't rotate, causing an offset between the shape and it's selector.
Note: I noticed that moving the group after rotation triggers the ItemRotate event;
if (dataItem.Align.toUpperCase() === "left".toUpperCase()) {
g.append(new dataviz.diagram.Rectangle({
width: dataItem.width,
height: dataItem.height,
fill: dataItem.Color
}));
g.append(new dataviz.diagram.Rectangle({
width: dataItem.width * 0.25,
height: dataItem.height,
fill: "Red"
}));
g.rotate(dataItem.Angle, new dataviz.diagram.Point(30, 30));
}
I have tried :
Setting the rotation on each shape instead of the group, with the same results. see below
setting rotation angle in shape defaults but each group's Angle varies and was unable to set it dynamically using the dataItem's Angle.
var rect = new dataviz.diagram.Rectangle({
width: dataItem.width * 0.25,
height: dataItem.height,
fill: "Red"
});
rect.rotate(dataItem.Angle, new dataviz.diagram.Point(30, 30));
Note: I noticed that moving the group after rotation triggers the ItemRotate event;
if (dataItem.Align.toUpperCase() === "left".toUpperCase()) {
g.append(new dataviz.diagram.Rectangle({
width: dataItem.width,
height: dataItem.height,
fill: dataItem.Color
}));
g.append(new dataviz.diagram.Rectangle({
width: dataItem.width * 0.25,
height: dataItem.height,
fill: "Red"
}));
g.rotate(dataItem.Angle, new dataviz.diagram.Point(30, 30));
}
I have tried :
Setting the rotation on each shape instead of the group, with the same results. see below
setting rotation angle in shape defaults but each group's Angle varies and was unable to set it dynamically using the dataItem's Angle.
var rect = new dataviz.diagram.Rectangle({
width: dataItem.width * 0.25,
height: dataItem.height,
fill: "Red"
});
rect.rotate(dataItem.Angle, new dataviz.diagram.Point(30, 30));