We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Swim Lane drop from palette not sizing properly

Thread ID:

Created:

Updated:

Platform:

Replies:

117980 Jan 15,2015 07:27 PM Jan 20,2015 12:32 AM ASP.NET Web Forms 4
loading
Tags: Diagram
Jim Jacobs
Asked On January 15, 2015 07:27 PM

Hi,

See the attached video for a demonstration of the issue.
The swimlane that is dropped is very small and does not even show the lane.
I have to drag it to get the size I want,

Here's how the palette item is created in code behind:

Lane horLane = CreateSwimLane("HorizLane", "horizontal", 140, 60);
...
private Lane CreateSwimLane(string name, string orientation, int width, int height)
    {
        Lane swimLane = new Lane();
        swimLane.Name = name;
        swimLane.Header.Text = "";
        swimLane.Header.Width = 60;
        swimLane.Header.Height = 60;
        swimLane.Header.FillColor = "#C7D4DF";
        swimLane.Header.FontSize = 11;
        swimLane.Width = width;
        swimLane.Height = height;
        swimLane.Orientation = orientation;
        swimLane.FillColor = "#f5f5f5";
        swimLane.OffsetX = 60;
        swimLane.OffsetY = 60;
        return swimLane;
    }

What am I doing wrong?

Thanks

Jim

Attachment: Syncfusion__Swim_Lane_Drop_Issue_24aa5c68.zip

Shyam G [Syncfusion]
Replied On January 19, 2015 08:42 AM

Hi Jim

Thanks for using Syncfusion products.

Please note that the lane rendered in the palette has it’s default value of width and height which is set in the code behind. Whenever we drag and drop the node(lane) from the palette into the diagram, then the node’s width and height will be based on the PreviewWidth and previewHeight. So we suggest you to set the width and height for the lane using the “nodeCollectionChange” event and this event triggers before the node gets added in the diagram. We have provided sample and code snippet below for your reference.

Code snippet:

DiagramContent.OnClientNodeCollectionChange = "nodecollectionchanged";

function nodecollectionchanged(args) {

if (args) {

            if (args.element && args.element.isSwimlane) {

                if (args.element.orientation == "horizontal") {

                    args.element.minHeight = 120;

                    args.element.minWidth = 450;

                }

                if (args.element.orientation == "vertical") {

                    args.element.minHeight = 450;

                    args.element.minWidth = 120;

                }

                diagram.updateNode(args.element.name, {});

            }

        } 

}   

Sample:http://www.syncfusion.com/downloads/support/directtrac/117980/diagrambuildersample1211504405.zip

Please let me know if any concerns.

Regards,

Shyam G



Jim Jacobs
Replied On January 19, 2015 05:33 PM

Hi Shya,

The code you provided works.  Thanks

However, subsequent lanes dropped on the swimlane do not size properly.
See the attached video.

How do I fix this?

Thanks again.

Jim

Attachment: Syncfusion__Lanes_Dropped_Not_Sized_Correctly__19Jan2015_15b4c23b.zip

Jim Jacobs
Replied On January 19, 2015 05:34 PM

Shyam, sorry about leaving the "m" off your name.
Jim

Shyam G [Syncfusion]
Replied On January 20, 2015 12:32 AM

Hi Jim

Thanks for the update

We have analyzed your requirement with our sample and we are unable to reproduce the reported issue at our end. Could you please provide us more details such as sample or share us a sample script file that you have used in your application or modify the below sample to reproduce the reported issue at our end?. This will help us to verify and provide better solution to you. please refer the below sample and video for your reference.

Sample:http://www.syncfusion.com/downloads/support/directtrac/117980/diagrambuilder972757057.zip

Video: http://www.syncfusion.com/downloads/support/directtrac/117980/nodelane2078322250.zip

Please let me know if any concerns.

Regards,

Shyam G



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;