[Mono-bugs] [Bug 582902] When ImageMap.HotSpotMode is set to HotSpotMode.NotSet, no default behavior is adopted and no navigation link is rendered to client.

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Feb 26 15:19:58 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=582902

http://bugzilla.novell.com/show_bug.cgi?id=582902#c5


--- Comment #5 from Jeffrey Alvarez <kuritsu at gmail.com> 2010-02-26 20:19:57 UTC ---
Sorry if I insist, but it's just because I don't know much about setting up my
environment... does it mean that I need to download all the repository to make
my mono source fully updated and make the project work? 
I'm still a bit confused. The code I'm talking about (the one I downloaded as
pointed in my previous comment) is this (ImageMap.cs):

protected internal override void Render (HtmlTextWriter writer)
{
    base.Render (writer);
            ....
    HotSpotMode mode = spot.HotSpotMode != HotSpotMode.NotSet ?
spot.HotSpotMode : HotSpotMode;
    switch (mode) {
        case HotSpotMode.Inactive:
        writer.AddAttribute ("nohref", "true", false);
        break;
        case HotSpotMode.Navigate:
        string target = spot.Target.Length > 0 ? spot.Target : Target;
        if (!String.IsNullOrEmpty (target))
        writer.AddAttribute (HtmlTextWriterAttribute.Target, target);
#if TARGET_J2EE
            string navUrl = ResolveClientUrl (spot.NavigateUrl, String.Compare
(target, "_blank", StringComparison.InvariantCultureIgnoreCase) != 0);
#else
        string navUrl = ResolveClientUrl (spot.NavigateUrl);
#endif
            writer.AddAttribute (HtmlTextWriterAttribute.Href, navUrl);
        break;
            case HotSpotMode.PostBack:
        writer.AddAttribute (HtmlTextWriterAttribute.Href,
Page.ClientScript.GetPostBackClientHyperlink (this, n.ToString(), true));
        break;
    }
    writer.RenderBeginTag (HtmlTextWriterTag.Area);
    writer.RenderEndTag ();
}
writer.RenderEndTag ();
} 
}

As you can see, if both spot.HotSpotMode and this.HotSpotMode are equal to 
HotSpotMode.NotSet, then nothing is done, since case HotSpotMode.NotSet is not
included in the switch statement. In the enum definition, HotSpotMode.NotSet =
0 and HotSpotMode.Navigate = 1. And the default value of property
ImageMap.HotSpotMode and property HotSpot.HotSpotMode is HotSpotMode.NotSet.
When I run the project, the default behavior of the HotSpot, which should be
navigate, doesn't work. No navigation can be performed in any pixel of the
image map.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list