Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Prevention of Node deletion in ImageMap Mode (Read 4136 times)
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Prevention of Node deletion in ImageMap Mode
May 6th, 2009 at 1:56pm
Print Post  
Hello Stoyan, It seems I can prevent deleting of nodes in javaapplet mode by handling the nodedeleting javascript event. Is there anything like this for imagemap mode? How can I prevent deletion of a node in ImageMap? Thanks.
jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevention of Node deletion in ImageMap Mode
Reply #1 - May 7th, 2009 at 10:32am
Print Post  
Hi Jay,

Version 3.0.1 adds support for the Deleting, Creating and Modifying script properties in ImageMap mode. The last build we sent you should let you handle them like this:

<... NodeDeletingScript = "onNodeDeleting">

function onNodeDeleting(sender,args)
{
     args.set_cancel(!confirm('Are you sure?'));
}

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: Prevention of Node deletion in ImageMap Mode
Reply #2 - May 7th, 2009 at 2:51pm
Print Post  
Hmm....For some reason, it does not seem to be working for me. The latest I downloaded was this version: https://mindfusion.eu/_beta/netdiag103beta.zip

here is the code:


<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" language="javascript">
       function onNodeDeleting(sender, args) {
           args.set_cancel(!confirm('Are you sure?'));
       }
    </script>
</head>
<body style="background-color:#CCCCCC">
    <form id="form1" runat="server">
    <asp:ScriptManager runat="server" ID="scriptmanager" AsyncPostBackTimeout="300">
    </asp:ScriptManager>
    <asp:UpdatePanel runat="server" ID="up1">
       <ContentTemplate>
           <ndiag:DiagramView runat="server" DelKeyAction="DeleteSelectedItems" ID="diagView" AutoScroll="true" Height="500px" Width="500px"  ClientSideMode="ImageMap"
              NodeDeletingScript="onNodeDeleting">
               <Diagram AllowSelfLoops="false" TextColor="White" DefaultShape="Rectangle" AutoResize="RightAndDown" LinkCrossings="Arcs"
                RouteLinks="true"  />
           </ndiag:DiagramView>
           <ndiag:InteractivityExtender ID="InteractivityExtender1" TargetControlID="diagView" runat="server" />
           <asp:Button runat="server" ID="btntest" Text="test" />
       </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>


Thanks,
jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevention of Node deletion in ImageMap Mode
Reply #3 - May 8th, 2009 at 7:27am
Print Post  
You must also set EnableItemsDOM=true for these events to work in ImageMap mode.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: Prevention of Node deletion in ImageMap Mode
Reply #4 - May 8th, 2009 at 2:19pm
Print Post  
Hey Stoyan. I think we are getting closer. I am now getting this javascript error:

Microsoft JScript runtime error: 'JSON' is undefined

any ideas? Thanks
jay
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevention of Node deletion in ImageMap Mode
Reply #5 - May 8th, 2009 at 2:50pm
Print Post  
Our developer played with the built-in JSON parser of IE8, so this won't work in older IE versions. We'll upload a version that does not use it in awhile.

Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Prevention of Node deletion in ImageMap Mode
Reply #6 - May 8th, 2009 at 4:05pm
Print Post  
The assemblies from the link below should work correctly. The required change was done in a .js file embedded as a resource, so this version might have the future-date problem again...

https://mindfusion.eu/_beta/netdiag301_json.zip
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint