Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic LoadFromString shapes changes to default shape (Read 1949 times)
madhukampurath
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Sep 15th, 2010
LoadFromString shapes changes to default shape
Oct 8th, 2010 at 8:18am
Print Post  
Hi,

I am using ImageMap for ClientSideMode. I have created a custom shape library using Shape Designer and is using them in my diagrams. I am saving the diagram XML into database and later loads the diagram from that XML (for editing the diagram).

However, when I load diagram from saved XML, all the shapes used in my diagram changes to the default shape(Arrow1 in my case). How can I prevent it ?

I am already setting the ShapeLibraryLocation immediately before loading the diagram. Also, I have put the following in Web.Config

<staticContent>
<mimeMap fileExtension=".shl" mimeType="text/xml" />
</staticContent>

in System.WebServer.

I noticed that, when I refresh the page, diagram is coming correctly. Also, this happens only for the first diagram. When the first diagram begins to appear correctly (after reload), all subsequent diagrams loads with correct shapes.

Thanks

Madhu Kampurath
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: LoadFromString shapes changes to default shape
Reply #1 - Oct 8th, 2010 at 8:58am
Print Post  
Hi Madhu,

The location property should be applied in the init phase or the control lifecycle, at what point are you loading the diagram? In any case you can call ShapeLibrary.LoadFrom() before Diagram.LoadFromXml() and the shapes should be available then.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
madhukampurath
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 10
Joined: Sep 15th, 2010
Re: LoadFromString shapes changes to default shape
Reply #2 - Oct 11th, 2010 at 8:26am
Print Post  
Hi Stoyo,

This fixed the problem.

Actually, I was not using ShapeLibrary.LoadFrom(). I was just setting the ShapeLibraryLocation of Shape List.

Many thanks.

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