Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Using ShapeLibrary.LoadFrom with the DiagramApplet (Read 2712 times)
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Using ShapeLibrary.LoadFrom with the DiagramApplet
Nov 28th, 2013 at 11:22am
Print Post  
Hello,

We have found a problem with the use of the ShapeLibrary.LoadFrom method.

I am working with the version 3.4

We have a servlet which creates a graph. This graph has 2 shapes not given with JDiagram so we load these shapes with the ShapeLibrary.LoadFrom method in the servlet.
We generates a string with the savetoString method.
The DiagramApplet loads this string in the applet parameter DiagramData.

My new shapes are not displayed (a rectangle replaces it).
Interesting thing, I have defined anchor points for these 2 shapes and they are good in the display of the links.
If I don't display my graph in a applet, it works.

Is it normal ?

Regards,

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Using ShapeLibrary.LoadFrom with the DiagramApplet
Reply #1 - Nov 28th, 2013 at 11:39am
Print Post  
Hi,

Shape definitions are not serialized by saveToString, and the applet will show rectangles if the shape identifiers it loads do not match existing shapes. In addition to the DiagramData param, try adding a ShapeLibrary param whose value is set to the shape library file's URL; that should load your custom shapes before loading the diagram nodes and render them correctly.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
JR
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 86
Joined: Jun 12th, 2007
Re: Using ShapeLibrary.LoadFrom with the DiagramApplet
Reply #2 - Nov 28th, 2013 at 11:52am
Print Post  
Great, it works !! Smiley

Thanks

Juan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint