Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Diagramming crashes suddenly while running (Read 5163 times)
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Diagramming crashes suddenly while running
Oct 23rd, 2020 at 12:04pm
Print Post  
Hello,

The diagrams will crashes suddenly while running.
Please refer to the vedio :
a)https://drive.google.com/file/d/1VhMr1ahJUOMBtI6WzMmZBDVX_rwCrxnQ/view?usp=sha
ring
b)https://drive.google.com/file/d/1KRLLv2U42HMD7GDC3xxBA2-4WjTIkLXK/view?usp=sha
ring

Here is my project :
https://drive.google.com/file/d/1JoCW5YpB_6DbvIT3yftLFig3NoFd3eTy/view?usp=shari
ng

1.Why the icon not display and  cannot select node when page appearing?

2.Is there possible to enable touching and dragging pans the view when the behavior is SelectOnly and set ShowScrollToggle to false ?

3.Is there possible to click the selection area and popup dialog when multiple nodes selected ?

Please Help.

Thanks and Regards.
  

crash.txt ( 125 KB | 185 Downloads )
crash.png ( 65 KB | 158 Downloads )
crash.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #1 - Oct 26th, 2020 at 7:01am
Print Post  
Hi,

I am not able to reproduce the crash using Xamarin.Forms 4.6 and Android 9.0 (API 28) in the provided test project. What versions you are using? And are you doing anything specific during the crash, or it's just randomly selecting/deselecting nodes?

I'll get back to you for your other questions shortly.

Regards,
Lyubo
MindFusion
« Last Edit: Oct 26th, 2020 at 8:11am by Lyubo »  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #2 - Oct 26th, 2020 at 9:09am
Print Post  
Hi,

Mandy wrote on Oct 23rd, 2020 at 12:04pm:
1.Why the icon not display and cannot select node when page appearing?

I could not reproduce that in your test application project. Image drawing is done asynchronously, but even if I disable the image in your IconNode class, I am able to select the nodes when the diagram appears.

Quote:
2.Is there possible to enable touching and dragging pans the view when the behavior is SelectOnly and set ShowScrollToggle to false ?

If you use the Pan or PanAndModify behaviors, you can select nodes by tapping and scroll the diagram by dragging, without the use of the ScrollToggle function. If you want to be able to draw the selection lasso around nodes too, you will need to suggest a way to distinguish between the 2 interactions (drawing the selection and scroll by draggin) to provide you with an alternative solution.

Quote:
3.Is there possible to click the selection area and popup dialog when multiple nodes selected ?

You can check the contents of the diagram.Selection object from a NodeClicked event handler to check if there's multiple selection, and show your popup.

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


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming crashes suddenly while running
Reply #3 - Oct 27th, 2020 at 5:03am
Print Post  
New Project:
https://drive.google.com/file/d/1oE8Sw3qsmRA4erCpiyFjxuDCUdYQ7ZEG/view?usp=shari
ng

New video of crash:
https://drive.google.com/file/d/19CPhuJQoWdZ05vz3pALebmuI74w6eH3C/view?usp=shari
ng


1.I upgrade the Xamarin Form to 4.8.0.1560 and run on the SAMSUNG SM-G9287 Android 7.0. It will crashes suddenly when randomly selecting/deselecting nodes/click the compass icon/zoom in zoom out the diagram.

2.The node cannot select and icon not display when set the Icon load image from URL.

3.In any mode, I need select multiple node and node can not be drag and drop.

4.Can you provide a behavior that can zoom in/zoom out the diagram and select multiple node without using the compass ?

5.What event will happen after i selected multiple nodes ?

Thanks and Regards.
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #4 - Oct 27th, 2020 at 8:04am
Print Post  
Hi,

The crash happens on your device, because the expected API level is 26 (Android 8.0+) for Google Play store compatibility. We'll have in mind to add a runtime backwards compatibility check in the next release.

Mandy wrote on Oct 27th, 2020 at 5:03am:
2.The node cannot select and icon not display when set the Icon load image from URL.


As I wrote in my previous post, I am unable to reproduce the issue in your test project. Images load and selection works. As I can see in the provided video above, images are loading too, and nodes are being selected. Do you mean some other issue?

Quote:
3.In any mode, I need select multiple node and node can not be drag and drop.

4.Can you provide a behavior that can zoom in/zoom out the diagram and select multiple node without using the compass ?


You will need to use a custom behavior class to achieve this functionality. Please provide us with the expected way to distinguish between selection / panning / zooming interactions, so we can assist you further with implementation.

Quote:
5.What event will happen after i selected multiple nodes ?


There's the Diagram.SelectionChanged event, which is raised when an item is added to or removed from the selection.

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


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming crashes suddenly while running
Reply #5 - Oct 27th, 2020 at 12:07pm
Print Post  
I will set my project to minSdkVersion 28.

a)selection :  selectonly with multiple selection.
b)panning : only pan without modify.
c)zooming : zoom in and zoom out in one mode without switch the compass.

'SelectionChanged' is for each item, is there any event let me know what items have been selected ?


Thanks and Regards.
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #6 - Oct 27th, 2020 at 12:29pm
Print Post  
Hi,

I meant more what interactions would cause the different effects - what's your preferred way to distinguish between drawing a selection rectangle and panning for example. Since both interactions are essentially dragging the pointer across the canvas, so there needs to be a way to infer what action to carry out - selection or panning.

Currently the SelectionChanged event doesn't provide information which item caused the change, but you can inspect the contents of the Selection object to see how many and which items are selected.

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


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming crashes suddenly while running
Reply #7 - Oct 28th, 2020 at 7:19am
Print Post  
Hi,

1.I preferred is panning.

2.Sorry, what I meant is what events will trigger after i drawing a selection rectangle and the finger is released from the screen ( like MouseUp event on WinForm) ?


Thanks and Regards.
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #8 - Oct 28th, 2020 at 1:40pm
Print Post  
Hi,

1) Currently, the way to distinguish between a select and pan interaction is achieved in the way you have it set up in your sample application - by setting Behavior to SelectOnly - then dragging a pointer across the canvas results in drawing a selection lasso; and then you have the ScrollToggle button - when it's toggled on, the same interaction will result in panning the canvas.

In your initial question you wanted to hide the ScrollToggle, so in order to have both behaviors result from a single type of interaction, there must be a way to infer the intention behind it - panning or selection - that's what the ScrollToggle does in this case.

Without the ScrollToggle your options are to change the Behavior from SelectOnly to Pan based on some user choice - for example from a dropdown or button, or by implementing a custom behavior class that will respond to the same user interaction in different manner - and that option will need a mechanism to distinguish between the two results (panning/selection).

2) When you draw the selection lasso over a group of nodes, you will receive SelectionChanged and NodeSelected events for each node that's part of the selection. The Xamarin equivalent for MouseUp is the Diagram.TouchUp event - you can handle that and in combination with SelectionChanged determine if the interaction has completed.

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


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming crashes suddenly while running
Reply #9 - Oct 30th, 2020 at 9:52am
Print Post  
Hi,

Is there possible to disable node drag and drop when behavior is PanAndModify ?

I need select single node and node can not be drag and drop and the diagram can panning.


Thank you.
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #10 - Oct 30th, 2020 at 2:15pm
Print Post  
Hi,

To achieve this behavior use Pan instead of PanAndModify.

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


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming crashes suddenly while running
Reply #11 - Nov 2nd, 2020 at 3:20am
Print Post  
Hi,

The node can not be selected when use Pan mode.
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming crashes suddenly while running
Reply #12 - Nov 2nd, 2020 at 7:09am
Print Post  
Hi,

With the default behavior of Pan, you can select nodes by tapping them. Make sure you're not preventing that from a NodeSelecting or other event handler. Selection won't work on locked nodes either.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint