Moving rotated group causing shape to increase in size

3 posts, 0 answers
  1. Tjay
    Tjay avatar
    2 posts
    Member since:
    Jun 2018

    Posted 29 Nov 2018 Link to this post

    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. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 03 Dec 2018 Link to this post

    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.
  3. Tjay
    Tjay avatar
    2 posts
    Member since:
    Jun 2018

    Posted 04 Dec 2018 in reply to Konstantin Dikov Link to this post

    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

     

Back to Top