Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add node and give bigger name. Drag this node. It causes display issue. (Read 2584 times)
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Add node and give bigger name. Drag this node. It causes display issue.
Sep 21st, 2020 at 11:20am
Print Post  
I have attached file here.
issue regarding when adding big name for the container node and drag this node and change the position that time showing below image issue
« Last Edit: Sep 22nd, 2020 at 1:59pm by reshma »  

B_diagram_name.png ( 26 KB | 102 Downloads )
B_diagram_name.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #1 - Sep 22nd, 2020 at 4:10pm
Print Post  
try this:
Code
Select All
ContainerNode.prototype.onUpdateVisuals = function(ctr)
{
	var rect = ctr.getBounds().clone();
	rect.height = ctr.getCaptionHeight();
	ctr.text.clipPath = new MindFusion.Drawing.Path();
	ctr.text.clipPath.addRect(rect.x, rect.y, rect.width, rect.height);
};
 

  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #2 - Sep 23rd, 2020 at 6:06am
Print Post  
i am using javascipt i have not found clippath in text and clone of getbound()
Please suggest me what i can use?
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #3 - Sep 23rd, 2020 at 8:40am
Print Post  
Hi,

Change the function signature to function(ctr: any).

Regards,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #4 - Sep 29th, 2020 at 7:23am
Print Post  
above code is working but caption text is showing empty I want to show some text inside in this case.
when I am increasing width that time it is showing text.

if i removed setFoldable(true) then it start to show text but i need this
setFoldable(true).
Can you please suggest me how to show text?'
« Last Edit: Sep 29th, 2020 at 1:30pm by reshma »  

Showing_Empty_Text.png ( 6 KB | 110 Downloads )
Showing_Empty_Text.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #5 - Oct 2nd, 2020 at 9:55am
Print Post  
I can't see that happen in Containers.html example -

Code
Select All
container.setText("assemblyexample-test-test-test-test-test");
container.setFoldable(true);
ContainerNode.prototype.onUpdateVisuals = function(ctr)
{
	var rect = ctr.getBounds().clone();
	rect.height = ctr.getCaptionHeight();
	ctr.text.clipPath = new MindFusion.Drawing.Path();
	ctr.text.clipPath.addRect(rect.x, rect.y, rect.width, rect.height);
}; 



Let me know what should I add to reproduce.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3146
Joined: Oct 19th, 2005
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #6 - Oct 2nd, 2020 at 9:59am
Print Post  
Seeing your large caption height, maybe verify you aren't clipping to a smaller rectangle than current caption area. E.g. if you keep original Rect or Path saved somewhere and then text is centered in the larger rectangle but clipped by original one, it will disappear indeed.
  
Back to top
 
IP Logged
 
reshma
Junior Member
**
Offline


I Love MindFusion!

Posts: 91
Joined: Jan 16th, 2018
Re: Add node and give bigger name. Drag this node. It causes display issue.
Reply #7 - Oct 12th, 2020 at 4:32am
Print Post  
i used below additional code it works for me
  ctr.text.setBounds(rect);
  ctr.text.fitInBounds = true;
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint