This is a migrated thread and some comments may be shown as answers.

Moving rotated group causing shape to increase in size

2 Answers 72 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Tjay
Top achievements
Rank 1
Tjay asked on 29 Nov 2018, 05:07 PM
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));

2 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 03 Dec 2018, 01:27 PM
Hi Tjay,

Could you please create a dojo example demonstrating the issue that you are facing, so we can test and debug it locally?
Looking forward to your reply.


Regards,
Konstantin Dikov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Tjay
Top achievements
Rank 1
answered on 04 Dec 2018, 09:53 PM

HI, Thanks for the response, I have created a dojo sample but i'm currently lost because the main issue isn't happening on the dojo, even though the logic is identical safe for the transport details.You can try setting the angle of either shape to 150 to see the offset. I have attached a snippet of the actual datasources.

The URL is : https://dojo.telerik.com/UZosoroh/4

 

Tags
Diagram
Asked by
Tjay
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Tjay
Top achievements
Rank 1
Share this question
or