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.
Syncfusion Feedback

How to disable all user interaction except "selecting" a node

Thread ID:

Created:

Updated:

Platform:

Replies:

119441 Jun 21,2015 01:57 PM Jun 24,2015 06:25 AM ASP.NET Web Forms 6
loading
Tags: Diagram
Jim Jacobs
Asked On June 21, 2015 01:57 PM

Hi,

Some of our users will only have read-only access to diagrams.
I have tried the following in code behind during page load:

            DiagramContent.Constraints = DiagramConstraints.None; // Disable all diagram interaction

This does not seem to work.
The user can select nodes, move them around, change text, etc.

What I need is to allow the user to do 1 thing - select a node.
Once selected I will then display associated properties in a separate window.

I have checked my Javascript and can find nowhere that I am overriding the diagram constraints.

Any suggestions?

Thanks

Jim

Shyam G [Syncfusion]
Replied On June 22, 2015 09:29 AM

Hi Jim

Thanks for using Syncfusion products.

Please note that the snippet(DiagramContent.Constraints = DiagramConstraints.None;) you have used to access the diagram as read-only is correct. If you need to perform certain operation in the diagram, when it is readonly, then it can be achieved using the click event. please refer the code snippet below.

Code snippet:

Diagram1.OnClientClick = "click";

  function click() {

            console.log("click")
        }

Please let me know if any concerns.

Regards,
Shyam G


Jim Jacobs
Replied On June 22, 2015 11:35 AM

Hi Shyam,

Thanks for the clue to use the click event.

But, my real problem is that neither of the following work:

In code behind during page load:
DiagramContent.Constraints = DiagramConstraints.None;

In script during $(window).load:
$("#DiagramContent").ejDiagram({ constraints: ej.datavisualization.Diagram.DiagramConstraints.None });

The diagram remains completely editable by the user!

Is this a bug, or is there something else that I need to do?

Jim



Shyam G [Syncfusion]
Replied On June 23, 2015 08:35 AM

Hi Jim

Thanks for your update.

We are able to reproduce the reported issue at our end. we have logged a defect report on this. Also we have created a support incident under your account to track the status of this issue.

Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

However we suggest you to set the nodeconstraints as select to achieve your requirement. Also set the label property readOnly as true to disable the node editing. Please refer the code snippet below.

Code snippet:

  Node Task =  new Node();

     Label label = new Label();

     //disable label editing

    label.ReadOnly = true;

   Task.Labels.Add(label);

     //set node constraints

    Task.Constraints = NodeConstraints.Select;
     DiagramContent.Model.Nodes.Add(Task);

Please let me know if any concerns.

Regards,
Shyam G


Jim Jacobs
Replied On June 23, 2015 11:03 AM

Hi Shyam,

Thanks for the code, but I don't think it work for me.
Your code sets label and node properties when they are created.
I need to be able to make the whole diagram editable for our standard users, and read-only for our visitors.
Hence a diagram that has already been created needs to be rendered in either edit or read-only mode at runtime.

So, I think I'll wait for the formal fix to be available.

Jim

Shyam G [Syncfusion]
Replied On June 24, 2015 05:16 AM

Hi Jim

Thanks for your update.

We will inform you once the volume 2 release has been rolled out.

Please let me know if any concerns.

Regards,
Shyam G

Shyam G [Syncfusion]
Replied On June 24, 2015 06:25 AM

Hi Jim

Please ignore our previous update.

Please note that the reported issue will be included in our volume 2, release, which is scheduled to release in the end of June,2015.

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.

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

;