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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Getting started with userHandles - help

Thread ID:

Created:

Updated:

Platform:

Replies:

118169 Feb 7,2015 03:50 PM UTC Feb 10,2015 04:26 AM UTC ASP.NET Web Forms 3
loading
Tags: Diagram
Jim Jacobs
Asked On February 7, 2015 03:50 PM UTC

Hi,

I would like to implement the link userHandle in my application.
I've lifted the code from your DiagramBuilder sample that creates the handle (by the way, you give it a name of Line rather than Link).
I've also added the following 3 statements in my load event:

    // Add the link handle
    createLinkHandle(); // Code lifted directly from the SF DiagramBuilder sample app
    diagram.model.userHandles = userHandles;
    diagram._initHandles();

My selection change handler looks like this:

    function selectionChangeHandler(args) {
        var handles = diagram.model.userHandles;
        handles[0].visible = true;
        diagram.updateUserHandles(args.element);
    }

When I run the app and select a single node, the handle does not show.
I realize I need to be making a lot more checks in my handler above, but for now I'm just trying to get the link handle working when I click on a node.

I'm obviously missing something.
What would that be?

Thanks in advance.

Jim



Shyam G [Syncfusion]
Replied On February 9, 2015 01:24 PM UTC

Hi Jim

Thanks for using Syncfusion products.

Please note that we have made API changes for selector related properties (userHandles, selectorConstraints) in our latest release 12.4.0.24 and these properties  are moved from diagram model to selectedItems. Please refer the below sample and code snippet.

Code snippet:

var userHandles = [];

        $(window).load(function () {

            var diagram = $("#Diagram1").ejDiagram("instance");

            createUserHandles();

            diagram.model.selectedItems.userHandles = userHandles;

            diagram._initHandles();

        });

Sample:http://www.syncfusion.com/downloads/support/directtrac/118169/WebApplication2-1618908303.zip

We have provided the online UG documentation which represents how to use the “Selector”.

Documentation: http://help.syncfusion.com/ug/js/documents/selector.htm

Please refer the below Release notes link to view the breaking changes that we have made in our latest release 12.4.0.24.

Release notes link: http://files2.syncfusion.com/Installs/v12.4.0.24/ReleaseNotes/JavaScript.html#JS-Diagram

Please let me know if any concerns.

Regards,

Shyam G

Jim Jacobs
Replied On February 9, 2015 11:48 PM UTC

Hi Shyam,

That did the trick.
Thanks.

Jim


Shyam G [Syncfusion]
Replied On February 10, 2015 04:26 AM UTC

Hi Jim

Thanks for the update

Please let me know if you require further assistance on this.

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.

Warning Icon 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.Close Icon

;