Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how to crating freefrom Node (Read 1636 times)
shiwanV94
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Oct 5th, 2020
how to crating freefrom Node
Oct 5th, 2020 at 2:13pm
Print Post  
i'm new to mindfuction js library. Currently I'm working on diagram application .I need to add a free stroke creation functionality using mindfution js library. Thanks in Advance Smiley Huh Huh Huh
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: how to crating freefrom Node
Reply #1 - Oct 5th, 2020 at 4:41pm
Print Post  
Hi,

Code
Select All
var Behavior = MindFusion.Diagramming.Behavior;
diagram.setBehavior(Behavior.DrawFreeForms);
diagram.setAutoCloseDistance(0);
 



will let you draw FreeFormNode objects.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
shiwanV94
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Oct 5th, 2020
Re: how to crating freefrom Node
Reply #2 - Oct 5th, 2020 at 6:18pm
Print Post  
Thank you very much for your response Kiss Kiss,Once I have Implement above code free lines can be drawn, but node linking function not work anymore.
i have created link created event listener
diagram.addEventListener(Events.linkCreated, onLinkCreated);

and when link button clicked following lines of code will excite
function onSequence()
{
     var btnSrc = document.getElementById("sequence").src;
     linkDashStyle = DashStyle.Solid;
     headShape = "Triangle";
     baseShape = null;
     headBrush = "#7F7F7F";
     document.getElementById("sequence").src = "sequenceOn.png";
     document.getElementById("message").src = "messageOff.png";
     document.getElementById("association").src = "associationOff.png";
}
what would be the reason, Thanks Kiss Shocked Shocked
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: how to crating freefrom Node
Reply #3 - Oct 6th, 2020 at 5:16am
Print Post  
Change to Behavior.LinkFreeForms to also allow drawing links.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
shiwanV94
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 3
Joined: Oct 5th, 2020
Re: how to crating freefrom Node
Reply #4 - Oct 7th, 2020 at 5:43am
Print Post  
Thank you very much  Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint