Page Index Toggle Pages: [1] 2  Send TopicPrint
Hot Topic (More than 10 Replies) NetDiagram v3 preview (Read 12439 times)
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
NetDiagram v3 preview
Feb 16th, 2009 at 11:16am
Print Post  
https://mindfusion.eu/_beta/netdiagram_v3.zip

This preview version shows the new ImageMap mode features in NetDiagram 3:

* Overview control *

Displays a small-scale overview image of the diagram, and allows scrolling the actual diagram view by dragging a tracking rectangle. To use it in ImageMap mode, add an Overview instance from the MindFusion.Diagramming.WebForms.dll assembly, and connect to it an OverviewExtender from MindFusion.Extenders.dll to implement client-side interaction.

* ShapeListBox control *

Displays a list of shapes, and allows creating new nodes in the diagram by drag-and-drop. To use it in ImageMap mode, add a ShapeListBox instance from the MindFusion.Diagramming.WebForms.dll assembly, and connect to it a ShapeListboxExtender from MindFusion.Extenders.dll to implement client-side interaction.

* Clipboard support *

Set DiagramView.EnableClipboard = true, and users will be able to copy, cut and paste items via the Ctrl+C, Ctrl+X and Ctrl+V shortcuts. Copied items are serialized in the viewstate and can be pasted after a postback.

* Delete items using the Del key *

Pressing Del deletes either the active item, or all selected items, as set through the DelKeyAction property. The default is None - pressing Del does not delete items.

* Support for custom item types *

Set DiagramView.Behavior = Custom, and the objects created after users draw on the client side will be instances of the classes specified via the CustomNodeType or CustomLinkType properties.

* Client-side Diagram DOM in ImageMap mode *

Now you can do some change to the properties of diagram items on the client side, using the API defined in these JS files:
https://mindfusion.eu/_beta/js_dom.zip

When posting back, changed items are sent via JSON to the server where the server side DOM is updated accordingly.

* OrthogonalLayout layout algorithm *

It creates layouts similar to this one:


Note that the OrthogonalLayout class from previous NetDiagram versions is now called OrthogonalRouter.

* CircularLayout layout algorithm *

It creates layouts similar to this one:


We hope you'll like the new features. Any suggestions and feedback for further improvements are welcome.

We are going to upload an updated .jar file for the version 3 JavaApplet mode next week.

Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: NetDiagram v3 preview
Reply #1 - Feb 17th, 2009 at 7:23pm
Print Post  
Hello, I am trying to use the overview control with the imagemap type diagram. I am using it in conjunction with the Interactivity sample. When I load the diagram, the overview loads as well. Yet, there is no rectangle in the overview to move around to pan the diagram with. I did use the extender class and gave it the id of the overview control:

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
               <ContentTemplate>
                   <ndiag:DiagramView ID="diagView" runat="server" Height="480px" Width="640px" ClientSideMode="ImageMap" OnNodeModified="diagView_NodeModified">
                   </ndiag:DiagramView>
                   <cc1:InteractivityExtender ID="InteractivityExtender1" TargetControlID="diagView" runat="server" />
                   <ndiag:Overview ID="ovw" runat="server" DiagramViewID="diagView" Style="left: 680px; width: 260px;
                           position: absolute; top: 320px; height: 160px" />
                   <cc1:OverviewExtender ID="ovrExt" TargetControlID="ovw" runat="server" />
               </ContentTemplate>
           </asp:UpdatePanel>

I really would like to use the imagemap type of diagram as it is easier to call back server side to populate data/etc. Yet, I really need to also be able to do some sort of panning. Thanks.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #2 - Feb 17th, 2009 at 7:54pm
Print Post  
Hi,

Seems it doesn't work that well from inside an UpdatePanel. We'll fix it as soon as possible.

Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: NetDiagram v3 preview
Reply #3 - Feb 17th, 2009 at 8:00pm
Print Post  
Thanks for the quick response!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #4 - Feb 18th, 2009 at 10:10am
Print Post  
Hi,

It turned out the problem happens because of the "position: absolute;" style. If you remove it, the tracking rectangle should work fine. We'll upload a fixed version in a few days.

Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: NetDiagram v3 preview
Reply #5 - Feb 18th, 2009 at 6:41pm
Print Post  
Hello again. Now I am trying to use the shapelistbox as an imagemap. I added the extender yet I get an error of Object reference not set to an instance of an object becuase the parameters of "type" and "dataId" do not exist inside of the page_load of the imagegen.aspx.vb

my code is below and is all in the aspx:
<%@ Page Language="VB" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<%@ Register Assembly="MindFusion.Extenders" Namespace="MindFusion.Diagramming.WebForms"
TagPrefix="cc1" %>

<%@ Register Assembly="MindFusion.Diagramming.WebForms" Namespace="MindFusion.Diagramming.WebForms"
TagPrefix="ndiag" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server" />

<div>


<asp:UpdatePanel ID="UpdatePanel1" runat="server">


<ContentTemplate>



<cc1:ShapeListBoxExtender ID="ShapeListBoxExtender1" runat="server" TargetControlID="shapeList" />



<ndiag:ShapeListBox ID="shapeList" runat="server" Style="width: 160px;



height: 320px; background-color: white" ClientSideMode="ImageMap" />


</ContentTemplate>


</asp:UpdatePanel>


<asp:Button ID="Button1" runat="server" Text="Button" />


<asp:Button ID="Button2" runat="server" Text="select all" />

</div>


</form>
</body>
</html>



Thanks again. Also, is there a way to customize your own shapes inside of the shapelistbox?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #6 - Feb 18th, 2009 at 9:28pm
Print Post  
There is a new ImageGen.aspx that is required by Netdiagram v3, but we haven't created the VB version yet. We'll try to port it to VB and upload it here tomorrow.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #7 - Feb 18th, 2009 at 9:35pm
Print Post  
You can assign a list of shape IDs to be displayed in the listbox to the ShapeFilter property. It that property is not set, the control displays all available shapes.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #8 - Feb 19th, 2009 at 3:36pm
Print Post  
The Overview version here should also work with absolution positioning:

https://mindfusion.eu/_beta/netdiagram_v3.zip

It should also improve the quality of the generated Overview image.

Now the archive contains the latest ImageGen versions as well.

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: NetDiagram v3 preview
Reply #9 - Feb 19th, 2009 at 5:47pm
Print Post  
Great. Thanks a lot.

One thing with the delete key on deleting the shape I noticed was that when you try and delete the last shape added to the diagram you get the following script error:

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

It does work however on previous shapes that were added. It just always seems to be the last shape added that has the problem.

Also, getting back to the shapefilter property. Are you saying you just can filter which predefined shapes exists in the shapelistbox? or can you add your own created shapes to  it? If so, how? Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #10 - Feb 19th, 2009 at 6:04pm
Print Post  
There are two ways to add custom shapes. You could either define custom Shape objects from code, or create a shape library file using the ShapeDesigner tool and load it into the application using ShapeLibrary.LoadFrom(). Associate some IDs to the custom Shape objects, and add these IDs to ShapeFilter. Note that custom shape definitions are not preserved between postbacks, so you might have to define or load them at every page_load.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #11 - Feb 20th, 2009 at 9:49am
Print Post  
This should fix the index out of range problem:
https://mindfusion.eu/_beta/netdiagram_v3.zip
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: NetDiagram v3 preview
Reply #12 - Feb 20th, 2009 at 2:57pm
Print Post  
Thanks, but I seem to be getting a script error with the new dlls:

Microsoft JScript runtime error: 'WebForms' is undefined

When I copy back in the old dlls it works fine.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: NetDiagram v3 preview
Reply #13 - Feb 20th, 2009 at 3:33pm
Print Post  
Could you copy your aspx code for the netdiagram controls here? Was there any line number mentioned for the script error?

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
jcollins@scires
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 53
Joined: Feb 17th, 2009
Re: NetDiagram v3 preview
Reply #14 - Feb 20th, 2009 at 3:41pm
Print Post  
Well, now it seems to be working. I keep toggling back and forth between the old dls and the new and now it works. I am not sure what fixed it as I did nothing other than copy the dlls. The line it was failing on was below and webforms was nothing yet sys.webforms was something:

Sys.Application.add_init(function() {
    $create(WebForms.DiagramView, {"clipboard":true,"delete":true,"diagramItems":[],"diagramNodes":[],"down":"/MindFusion/InteractivityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCLODQWE
7PYudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_eJUsbBRMPznN4ZRd8V7QawIT_yRUpJ4V97R9OLM
LzZk1&t=633707222463750000","enableItemsDOM":false,"left":"/MindFusion/Interacti
vityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCLODQWE7PYudmAU5wIj1yHwntWpeORVnPNG3C
n5b-Zloc02_SQEwEVDX_FPQCQvOQrlOR2dV8h8FeC_rj7Mgdn46AB81&t=633707222463750000","l
eftdown":"/MindFusion/InteractivityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCLODQW
E7PYudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_SQEwEVDX_FPQCQvOQrlOR051KkO-UdN22va6C0
flTXY1&t=633707222463750000","leftup":"/MindFusion/InteractivityBeta/WebResource
.axd?d=MNneNdwDuwTu5MttCLODQWE7PYudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_SQEwEVDX_
FPQCQvOQrlOR8Wo_O5e9buEH1k9ZsT1Dvw1&t=633707222463750000","links":true,"nodes":f
alse,"right":"/MindFusion/InteractivityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCL
ODQWE7PYudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_qJdaDU_WzBi7pnR7COFGNfj6_huJUkm0kb
gZarbHC2Q1&t=633707222463750000","rightdown":"/MindFusion/InteractivityBeta/WebR
esource.axd?d=MNneNdwDuwTu5MttCLODQWE7PYudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_qJ
daDU_WzBi7pnR7COFGNVphcahmVoUfMkGeiWw71Ts1&t=633707222463750000","rightup":"/Min
dFusion/InteractivityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCLODQWE7PYudmAU5wIj1
yHwntWpeORVnPNG3Cn5b-Zloc02_qJdaDU_WzBi7pnR7COFGNdk6vUHQqKdj_RyFrfK73UM1&t=63370
7222463750000","select":true,"selectedArray":[],"selectedLinksArray":[],"up":"/MindFusion/InteractivityBeta/WebResource.axd?d=MNneNdwDuwTu5MttCLODQWE7P
YudmAU5wIj1yHwntWpeORVnPNG3Cn5b-Zloc02_OGrI5v0U0dNnyckm017AH6ysftEnutYpvIkw_405t
bw1&t=633707222463750000"}, null, null, $get("diagView"));
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint