- Home
- Forum
- ASP.NET Web Forms
- Getting started with userHandles - help
Getting started with userHandles - help
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
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: https://s3.amazonaws.com/files2.syncfusion.com/Installs/v12.4.0.24/ReleaseNotes/JavaScript.html#JS-Diagram
Please let me know if any concerns.
Regards,
That did the trick.
Thanks.
Jim
Hi Jim
Thanks for the update
Please let me know if you require further assistance on this.
Regards,
Shyam G
- 3 Replies
- 2 Participants
-
JJ Jim Jacobs
- Feb 7, 2015 03:50 PM UTC
- Feb 10, 2015 04:26 AM UTC