Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to avoid "stop" mouse pointer during linking? (Read 1909 times)
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
How to avoid "stop" mouse pointer during linking?
Jul 15th, 2021 at 6:27pm
Print Post  
Hi,

When I try to create link between two nodes by drag, the arrow head is shown as in the screen shot. But along with that the mouse pointer is "stop" icon? May I know how to avoid the stop icon?

Regards,
Kannan
  

Link_Arrow_Head_During_Drag.png ( 224 KB | 74 Downloads )
Link_Arrow_Head_During_Drag.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: How to avoid "stop" mouse pointer during linking?
Reply #1 - Jul 19th, 2021 at 6:04am
Print Post  
Hi,

You could enable AllowUnconnectedLinks property of diagram to allow creating the link even if not connecting to a node. If you still want to prevent unconnected links but just disable mouse pointer indication, set the MindFusion.Controls.MouseCursors.NotAllowed value to CSS cursor name that you prefer. Defaults are shown below.

Code
Select All
MindFusion.Controls.MouseCursors = {
	Auto: "auto", // The UA determines the cursor to display based on the current context.
	Crosshair: "crosshair", // A simple crosshair (e.g., short line segments resembling a "+" sign).
	Default: "default", // The platform-dependent default cursor. Often rendered as an arrow.
	Pointer: "pointer",
	Move: "move",
	HorizontalResize: "ew-resize",
	CounterDiagonalResize: "nesw-resize",
	DiagonalResize: "nwse-resize",
	VerticalResize: "ns-resize",
	Text: "text", // Indicates text that may be selected. Often rendered as an I-beam.
	Wait: "wait",
	Help: "help",
	Progress: "progress",
	Inherit: "inherit",
	Rotate: "all-scroll",
	Nothing: "null",
	NotAllowed: "not-allowed",
	Pan: "all-scroll"
}; 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: How to avoid "stop" mouse pointer during linking?
Reply #2 - Jul 19th, 2021 at 9:37am
Print Post  
Hi,

I need to set AllowUnconnectedLinks false because we don't need unconnected links. But want the mouse pointer to default mouse arrow cursor. May I know how to do with MindFusion.Controls.MouseCursors.NotAllowed?

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


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: How to avoid "stop" mouse pointer during linking?
Reply #3 - Jul 19th, 2021 at 9:41am
Print Post  
Hi,

Try setting MindFusion.Controls.MouseCursors.NotAllowed = "default"; // or "pointer"

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: How to avoid "stop" mouse pointer during linking?
Reply #4 - Jul 19th, 2021 at 9:53am
Print Post  
Hi,

I tried this earlier but giving this compile error. Am I missing anything?

ERROR in app/diagram/diagram.component.ts:174:25 - error TS2339: Property 'MouseCursors' does not exist on type 'typeof Controls'.

174     MindFusion.Controls.MouseCursors.NotAllowed = "default";

Do I want to try like this?

(MindFusion.Controls as any).MouseCursors.NotAllowed = "default";

Is this fine or any other approach?

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


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: How to avoid "stop" mouse pointer during linking?
Reply #5 - Jul 19th, 2021 at 10:01am
Print Post  
Hi,

Apparently we don't have MouseCursors defined in d.ts file if you are trying to set it from TypeScript. Try this instead:

Code
Select All
MindFusion.Controls["MouseCursors"].NotAllowed = "default"; 



Regards,
Slavcho
  
Back to top
 
IP Logged
 
Kannan Thirumal
Senior Member
****
Offline


I Love Mind Fusion Diagram
:-)

Posts: 270
Location: Bangalore, India
Joined: Jan 18th, 2019
Re: How to avoid "stop" mouse pointer during linking?
Reply #6 - Jul 19th, 2021 at 6:28pm
Print Post  
This seems working. Thank you!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint