Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How do I selectively prevent diagram shapes from being clickable? (Read 4202 times)
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
How do I selectively prevent diagram shapes from being clickable?
Dec 4th, 2012 at 6:00pm
Print Post  
Hi,

I would like to present a diagram on which the user cannot click on any links, and only on certain shapes.  I am using ImageMap mode.

I have read the following post, but I want to prevent the user from even seeing the mouse pointer change when they hover over a shape on which I do not want them to click.  When users see that, they will believe that they can in fact click on it.

Is there any way to prevent the shape/link to not be clickable in the first place (and not show the mouse pointer change to a hand).

Any suggestions?

Thanks

Jim

PS: Here's that other post I mentioned: http://mindfusion.eu/Forum/YaBB.pl?num=1339696488/1#1
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How do I selectively prevent diagram shapes from being clickable?
Reply #1 - Dec 5th, 2012 at 8:13am
Print Post  
Hi,

Try handling the CreatingAreaElement event like this -

Code
Select All
void diagramView_CreatingAreaElement(object sender, MindFusion.Diagramming.WebForms.CreatingAreaElementEventArgs e)
{
	if (e.Item is DiagramLink)
	{
		e.Attributes["onmouseover"] = "document.body.style.cursor = 'default'";
		e.Attributes["onmouseout"] = "document.body.style.cursor = ''";
	}
} 



Theoretically you should be able to set Attributes["style"] = "cursor:default", but it did not work for area elements in my test.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: How do I selectively prevent diagram shapes from being clickable?
Reply #2 - Feb 25th, 2013 at 3:32pm
Print Post  
Hi,

I realize this post is a bit old, and I must apologize for not thanking you earlier for the suggested approach.

It does work, with one exception.
Although the mouse pointer changes, the ToolTip on the links does not always show when you hover them.

I have found that this depends on the LinkTextStyle value.

The following does NOT show the tooltip: LinkTextStyle.Rotate
This one DOES: LinkTextStyle.MiddleSegment

Since most of my links use the first style, any ideas on how to get the tooltip to show?

Thanks in advance

Jim

PS: I've included 2 screenshots that demonstrate the issue.
  

NetDiargarm_-_Link_Tooltip_Issue_-_NOT_Working.png (Attachment deleted)
NetDiargarm_-_Link_Tooltip_Issue_-_Working.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How do I selectively prevent diagram shapes from being clickable?
Reply #3 - Feb 26th, 2013 at 1:42pm
Print Post  
Hi,

This shouldn't have anything to do with TextStyle, but if you change it to MiddleSegment for all links, do the tooltips start to work? The Tooltip value is set as a title attribute for the <area> element in the image map, and the control expects that the browser will detect the <area> under mouse pointer and show its tooltip. If you click on links that do not show tooltips, do you get the LinkClicked event raised for them?

Stoyan
  
Back to top
 
IP Logged
 
jlj30
Full Member
***
Offline


I love YaBB 1G - SP1!

Posts: 183
Joined: Sep 4th, 2011
Re: How do I selectively prevent diagram shapes from being clickable?
Reply #4 - Feb 26th, 2013 at 2:20pm
Print Post  
Stoyan,

Looks like the LinkTextStyle is not the issue.
I changed them all to be MiddleSegment with the same results.

I have attached a screenshot showing which links display their tooltips (yellow) and which ones do not (red).

Let me know if there's more that you need.

Thanks

Jim
  

NetDiargarm_-_Link_Tooltip_Issue_-_More_Info.png (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: How do I selectively prevent diagram shapes from being clickable?
Reply #5 - Feb 26th, 2013 at 2:41pm
Print Post  
It's because of the arrowheads color then Wink If you distinguish between kinds of links using arrowhead color and text style, is there any other property you can think of set to different values, e.g. Locked, or is there any difference in the tooltip texts?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint