Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic jQuery Custom nodes (Read 4085 times)
dittu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 20
Joined: Feb 6th, 2015
jQuery Custom nodes
Feb 13th, 2015 at 6:33am
Print Post  
I'm using jQuery instead of MicrosoftAjax. While trying out Tutorial 3 in samples (to create custom nodes), I'm facing issues on commands like
OrgChartNode.registerClass
OrgChartNode.initializeBase

Has anyone implemented custom nodes with jQuery, how to registerClass/initializeBase etc. Please provide some help by pasting code snippet .

Thanks in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: jQuery Custom nodes
Reply #1 - Feb 13th, 2015 at 8:15am
Print Post  
Use the following methods:

Code
Select All
MindFusion.AbstractionLayer.registerClass(type, typeName, baseType, interfaceTypes);
MindFusion.AbstractionLayer.initializeBase(type, instance, baseArguments); 



e.g.

Code
Select All
var al = MindFusion.AbstractionLayer;
al.registerClass(OrgChartNode, "OrgChartNode", MindFusion.Diagramming.ShapeNode);
al.initializeBase(OrgChartNode, this, [parent]); 



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


I Love MindFusion!

Posts: 20
Joined: Feb 6th, 2015
Re: jQuery Custom nodes
Reply #2 - Feb 13th, 2015 at 9:23am
Print Post  
Thanks Stoyan.

I tried doing that, it went further but there are many more errors in replacing MicrosoftAjax with jQuery version of sample/tutorial3.
like:
$addHandlers issue while adding NodeImageLocation
undefined ...d.drawVM81:1 a.drawVM81:1 a.repaintjquery-1.7.1.js:814 jQuery.extend.proxy.proxy

your help on this is highly appreciated.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: jQuery Custom nodes
Reply #3 - Feb 13th, 2015 at 9:50am
Print Post  
Here's a jQuery version of the tutorial.
  

Tutorial3JQ.zip (Attachment deleted)
Back to top
 
IP Logged
 
dittu
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 20
Joined: Feb 6th, 2015
Re: jQuery Custom nodes
Reply #4 - Feb 25th, 2015 at 11:19am
Print Post  
Thanks. Smiley
It worked by removing margin.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: jQuery Custom nodes
Reply #5 - Feb 25th, 2015 at 11:28am
Print Post  
If you mean the Text.margin field, in latest version of the control its type has been changed to Thickness, and you can set it like this:

Code
Select All
var Thickness = MindFusion.Drawing.Thickness;
this.text.margin = new Thickness(1, 1, 1, 1); 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint