Page Index Toggle Pages: 1 [2]  Send TopicPrint
Very Hot Topic (More than 25 Replies) How to create Lane node with text area/label and manipulate it (canvas mode)? (Read 17877 times)
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #15 - Nov 18th, 2016 at 9:53am
Print Post  
I'm guessing the bounding box calculated for the node does not consider rotation. Our developer will check.
  
Back to top
 
IP Logged
 
CrushJelly
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Oct 20th, 2016
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #16 - Nov 18th, 2016 at 12:41pm
Print Post  
Slavcho wrote on Nov 18th, 2016 at 9:53am:
I'm guessing the bounding box calculated for the node does not consider rotation. Our developer will check.



Ok. Let me know if there is some fix or something. Smiley


Doe's the CaptionBrush should set the ContainerNodes caption box color?

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #17 - Nov 18th, 2016 at 1:21pm
Print Post  
It's for the caption text color. In TableNode we have a CaptionBackBrush property for the background of captionbar but we haven't implemented it for containers; will try to add it there too for upcoming release.
  
Back to top
 
IP Logged
 
CrushJelly
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Oct 20th, 2016
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #18 - Nov 28th, 2016 at 1:08pm
Print Post  
Slavcho wrote on Nov 18th, 2016 at 1:21pm:
It's for the caption text color. In TableNode we have a CaptionBackBrush property for the background of captionbar but we haven't implemented it for containers; will try to add it there too for upcoming release.


I can't Align caption text at center, I tried these functions setTextAlignment and setLineAlignment, they are set to Center.

Is there workaround or I am doing something wrong?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #19 - Nov 28th, 2016 at 1:24pm
Print Post  
Have you replaced diagramming.js in your project with one from released version? If it still doesn't work, try clearing the browser cache.
  
Back to top
 
IP Logged
 
CrushJelly
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Oct 20th, 2016
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #20 - Nov 28th, 2016 at 1:54pm
Print Post  
Slavcho wrote on Nov 28th, 2016 at 1:24pm:
Have you replaced diagramming.js in your project with one from released version? If it still doesn't work, try clearing the browser cache.


Yes, I did. Cache is cleared. Still getting no result.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #21 - Nov 28th, 2016 at 5:05pm
Print Post  
By released version I mean v5.7 from last week, have you installed it?
http://mindfusion.eu/Forum/YaBB.pl?num=1480083513

Here's my test project, text alignments seems to work fine both from server and client sides -
https://mindfusion.eu/_samples/align_test.zip
  
Back to top
 
IP Logged
 
CrushJelly
Junior Member
**
Offline


I Love MindFusion!

Posts: 59
Joined: Oct 20th, 2016
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #22 - Nov 29th, 2016 at 11:16am
Print Post  
Slavcho wrote on Nov 28th, 2016 at 5:05pm:
By released version I mean v5.7 from last week, have you installed it?
http://mindfusion.eu/Forum/YaBB.pl?num=1480083513

Here's my test project, text alignments seems to work fine both from server and client sides -
https://mindfusion.eu/_samples/align_test.zip


Can I make specific place clickable only?, where I can edit Container caption (ex. I need to click caption to edit it, not the whole container. If I click not the caption, it selects the container.).

How to limit or somehow wrap caption text? (see pic)

With the new version Behavior has reset. Previously the behavior was set to Custom and mouse drawing has stopped, but now when I installed new version it doesn't work, now on mouse interaction (drag) in the diagram it starts drawing nodes. How to get rid of this?
« Last Edit: Nov 30th, 2016 at 7:15am by CrushJelly »  

captionNoCharLimit.PNG ( 20 KB | 179 Downloads )
captionNoCharLimit.PNG
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #23 - Nov 30th, 2016 at 7:39am
Print Post  
You will have to disable AllowInplaceEdit and call Diagram.beginEdit when you detect click on caption -

Code
Select All
function onNodeDoubleClicked(diagram, e)
{
	if (e.node.rotationAngle == 270 &&
		e.mousePosition.x < e.node.getRotatedBounds().x + e.node.captionHeight)
	{
		diagram.beginEdit(e.node, e.mousePosition);
	}
} 

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #24 - Nov 30th, 2016 at 9:26am
Print Post  
Quote:
How to limit or somehow wrap caption text? (see pic)


Text wraps at word boundaries. You could clip it like this -

Code
Select All
ContainerNode.prototype.onUpdateVisuals = function (ctr)
{
	if (ctr.rotationAngle == 270)
	{
		ctr.text.clipPath = new MindFusion.Drawing.Path();

		var cr = ctr.bounds;
		ctr.text.clipPath.addRect(cr.x, cr.y, cr.width, ctr.captionHeight);
	}
}; 



You could implement your own wrapping function that measures separate characters instead of words if you think it's necessary (case from your image looks more like users fooling around instead of writing useful text  Wink) E.g. see http://mindfusion.eu/Forum/YaBB.pl?num=1415114615/3#3 for the overriding code (not actual character measuring).

Quote:
With the new version Behavior has reset. Previously the behavior was set to Custom and mouse drawing has stopped


Custom behavior means it will draw the item types specified in CustomNodeType and CustomLinkType. If you want to prevent drawing, set Behavior to DoNothing, Modify or SelectOnly.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: How to create Lane node with text area/label and manipulate it (canvas mode)?
Reply #25 - Dec 6th, 2016 at 7:03pm
Print Post  
This version adds ContainerNode.CaptionBackBrush property -
https://mindfusion.eu/_temp/netdiag_captionbrush.zip

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send TopicPrint