Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic got script error when using canvas on DiagramView (Read 2889 times)
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
got script error when using canvas on DiagramView
Nov 18th, 2011 at 11:20am
Print Post  
Dear Sir/Madam,
I had download latest version of NetDiagram 4.1 and installed it successfully.
Currently I want to use DiagramView object which its ClientSideMode is canvas.
Then I created a new test project to test that functionality. There is one page called Default.aspx in this project.
Following the instruction, I had copied MindFusion.Diagramming.js and JDiagram.jar to the project and then add ScriptManager on this page,
When I run this project I got an error script message shown in the following.

Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; EasyBits GO v1.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET4.0C)
Timestamp: Fri, 18 Nov 2011 11:16:38 UTC
Message: Object doesn't support this property or method
Line: 2831
Char: 5
Code: 0
URI: http://localhost:1587/TestPM/ScriptResource.axd?d=0ZlJNC0UZRFQpsfj0IMjGJYDu7Ttrr...

Is there any example of canvas mode or suggestion?

Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: got script error when using canvas on DiagramV
Reply #1 - Nov 18th, 2011 at 12:06pm
Print Post  
Hi,

From the user agent screen it seems you are using IE8. Canvas support in Internet Explorer was implemented with version 9.

Stoyan
  
Back to top
 
IP Logged
 
chieh
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 64
Joined: Aug 18th, 2010
Re: got script error when using canvas on DiagramV
Reply #2 - Nov 18th, 2011 at 1:15pm
Print Post  
Hello
Are they not support IE 8?
Is there any chance for IE 8 because still lots of people using that.
So I use Chrome to test that function instead.
Steps I did in the following,
1. Drag and drop three objects (DiagramView, Overview and ShapeListBox) from toolbox in visual studio,
2. Define custom shape list for ShapeListBox and assign DiagramView’s ID to DiagramViewID
3. Run project
it works fine Because clientsidemode=”JavaApplet” is default, once I change all DiagramView,
Overview and ShapeListBox to Canvas, there is no error from these three objects, but Shape list came out as default one and not the one I defined.

This is setting of ShapeListBox,
<ndiag:ShapeListBox ID="ShapeListBox1" runat="server" Style="background-color: white" ShapeLibraryLocation="LeanIcons.shl" ClientSideMode="Canvas">
</ndiag:ShapeListBox>

If I change it to JavaApplet on ShapeListBox only, I can see the custom shape list but cannot drag and drop to the diagram.
So does it support custom shape in canvas or how to configure it properly?

Many thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: got script error when using canvas on DiagramV
Reply #3 - Nov 18th, 2011 at 2:29pm
Print Post  
Hi,

No, IE8 does not support the Canvas element. You could use the explorercanvas library to emulate a canvas via the IE's VML feature. We haven't tested it, and probably canvas mode will be very slow in IE8 anyway, both because of the much slower JavaScript interpreter there and because of the canvas emulation layer.

Unfortunately we haven't implemented support for custom shapes in Canvas mode yet. So the ShapeLibraryLocation property is ignored there and you can use only ShapeFilter to show a subset of the built-in shapes. If you need custom shapes in order to show bitmap images in the listbox, this can be done in the current version by setting the ImageURL property of nodes in the listbox, instead of setting their shapes.

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