Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming (Read 3627 times)
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 47
Joined: Jun 3rd, 2020
Diagramming
Jun 10th, 2020 at 11:17am
Print Post  
Hi,
Here is the project download location : https://drive.google.com/file/d/1oi7vGxbhgSIV0DO2i5loe3lu78GYdIuc/view?usp=shari
ng

There are some questions please advise.

On Page EntitiesDiagram :
The View1 is not arranged but View2 is auto arranged.
a)The void icon will be disappear when TableNode selected in view1.
b)The void icon is not in the correct position in view2.
c)How can I to set the avatar image center alignment and fit in the cell?
d)How to set the links between node Root and node 1055431 is from the bottom of Root to the top of 1055431?

On Page IconDiagram :
How can I to make the IconNode drag and drop?

Thanks!
  

a.png ( 127 KB | 186 Downloads )
a.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming
Reply #1 - Jun 10th, 2020 at 1:47pm
Print Post  
Hi,

a) Set Diagram.SelectionOnTop to false to show the attached node when selection is active;
b) Set KeepGroupLayout to true on your layered layout, otherwise the algorithm will try to arrange the attached nodes;
c) You can try a combination of ImageAlign.Fit and ImagePadding with a left margin;.
d) Set ConnectionStyle to TableConnectionStyle.Table on your table nodes

For drag and drop, can you be more specific with your requirements?

Regards,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 47
Joined: Jun 3rd, 2020
Re: Diagramming
Reply #2 - Jun 11th, 2020 at 11:00am
Print Post  
Hi Lyubo,

Thank you for your reply it's very helpful.

I would like to disable node's RadialMenu and popup custom page when double click or long press.
Is there possible to handle node double click / long pressed event ?

On IconDiagram :
a)How can i to set the IconNode's font size?
b)Is there possible to drag and move when i tapped on the text?


On EntitiesDiagram :
diagram.NodeClicked += (async (sender,e) => {
                await App.Current.MainPage.DisplayAlert(null, "NodeClicked", "OK");
            });
diagram.NodeSelected += (async (sender, e) => {
                await App.Current.MainPage.DisplayAlert(null, "NodeSelected", "OK");
            });
When i clicked the void icon, it will show 'NodeClicked' and 'NodeSelected' at the same time. I would like to click the void icon then popup 'NodeClick',click other position on the node will popup 'NodeSelected'.


Thanks!
  

b.png ( 72 KB | 170 Downloads )
b.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming
Reply #3 - Jun 11th, 2020 at 2:10pm
Print Post  
Hi,

Mandy wrote on Jun 11th, 2020 at 11:00am:
I would like to disable node's RadialMenu and popup custom page when double click or long press.

Unfortunately, it's not possible to disable the default context menu, we'll add this possibility in a following release. You could try modifying the existing menu items so they're transparent.

Mandy wrote on Jun 11th, 2020 at 11:00am:
Is there possible to handle node double click / long pressed event ?

There're no double click or long press events currently, we can try and implement them for a following release. As a workaround, you can use the RadialMenuCreated event to track long press events on nodes (it will fire for right clicks in desktop environments too though). Or you can track subsequent NodeClick events and measure the time it takes in between with a timer to detect double-clicks that way.

Mandy wrote on Jun 11th, 2020 at 11:00am:
On IconDiagram :
a)How can i to set the IconNode's font size?
b)Is there possible to drag and move when i tapped on the text?

To set the IconNode's font size, pass a Font instance with the desired size to the DrawString method in your DrawLocal override. To move the node from the label, you can use EasyMove or InvisibleMove HandlesStyle, but you'll need to make sure the text is within the node's bounds.

Mandy wrote on Jun 11th, 2020 at 11:00am:
On EntitiesDiagram :
diagram.NodeClicked += (async (sender,e) => {
await App.Current.MainPage.DisplayAlert(null, "NodeClicked", "OK");
});
diagram.NodeSelected += (async (sender, e) => {
await App.Current.MainPage.DisplayAlert(null, "NodeSelected", "OK");
});
When i clicked the void icon, it will show 'NodeClicked' and 'NodeSelected' at the same time. I would like to click the void icon then popup 'NodeClick',click other position on the node will popup 'NodeSelected'.

You can check the e.Node object in the NodeClicked event if it's a TableNode (the whole node) or a ShapeNode (void icon). NodeSelected will be raise only if the node was previously not selected, so I'm not sure if that would be the correct place to detect clicks. You can use the NodeClicked event for both your cases.

Regards,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 47
Joined: Jun 3rd, 2020
Re: Diagramming
Reply #4 - Jun 12th, 2020 at 11:19am
Print Post  
Hi Lyubo,

a)I'm try to setting the menu items to transparent but it seems not to work. What should I do?

I'm setting the Behavior to PanAndModify and set diagram.AllowInplaceDelete and diagram.AllowInplaceEdit to false, but the node still can edited in-place.

b)I'd like to TableNode/IconNode can move, select but cannot edit/delete, which Behavior i should set ?

c)Could you please provide an example for pass the Font to DrawString method, please?

d)The diagram.NodeClicked was not triggered when i click the green area on the  TableNode so i cannot check the e.Node object.

Thanks!
  

b_001.png ( 140 KB | 177 Downloads )
b_001.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming
Reply #5 - Jun 15th, 2020 at 7:12am
Print Post  
Hi,

Mandy wrote on Jun 12th, 2020 at 11:19am:
a)I'm try to setting the menu items to transparent but it seems not to work. What should I do?

I'm setting the Behavior to PanAndModify and set diagram.AllowInplaceDelete and diagram.AllowInplaceEdit to false, but the node still can edited in-place.


Try setting ItemSize and ImageSize on the menu item to Size.Zero. Edit operation won't start that way too.

Mandy wrote on Jun 12th, 2020 at 11:19am:
b)I'd like to TableNode/IconNode can move, select but cannot edit/delete, which Behavior i should set ?


Modify or PanAndModify behavior with combination of setting EnabledHandles to Move on your nodes should be enough. Alternatively, you can cancel resize modifications from a NodeModifying event handler.

Mandy wrote on Jun 12th, 2020 at 11:19am:
c)Could you please provide an example for pass the Font to DrawString method, please?


Calling WithSize method on a Font instance will return a new instance of the same font with modified size. Pass that font to the DrawString method. For example:
Code
Select All
var font = diagram.Font.WithSize(2); 



Mandy wrote on Jun 12th, 2020 at 11:19am:
d)The diagram.NodeClicked was not triggered when i click the green area on the TableNode so i cannot check the e.Node object.


Handle CellClicked event too. NodeClicked will be raised only when the TableNode is clicked outside of a cell - i.e. the header or the area below the cells.

Regards,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 47
Joined: Jun 3rd, 2020
Re: Diagramming
Reply #6 - Jun 15th, 2020 at 11:40am
Print Post  
Hi Lyubo,

Is possible to modify the orange circle to transparent?

Thank you for your help.
  

b_002.png ( 91 KB | 167 Downloads )
b_002.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming
Reply #7 - Jun 15th, 2020 at 12:19pm
Print Post  
Hi,

You can set the IsVisible flag on the Menu instance to false before exiting from the handler too.
Code
Select All
e.Menu.IsVisible = false; 



This will hide the selection circle. You may still need use your current code for the items too, otherwise their events may still fire.

Hope this helps,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint