You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Luca Morandini <lu...@tin.it> on 2005/06/01 09:50:28 UTC
Re: ImageMap widget for CForms
Vadim Gritsenko wrote:
> Luca Morandini wrote:
>
>> function onClickMap () {
>>
>> var x= Number(cocoon.request.getParameter("map.x"));
>> var y= Number(cocoon.request.getParameter("map.y"));
>
> Eww!
Ahem... what "Eww!", exactly, means ?
>> var uri;
>> uri= "<zoomed map uri/>";
>> frm.getWidget().lookupWidget("map").setImageSource(uri);
>
> Widget is available through event.sourceWidget, IIRC.
Hmmm... yes, it would be better, I'll look into it.
>> BTW, I'd like mouse coordinates to be retrieved by querying the map
>> widget rather than the request object... anyone knows a simple way to
>> do this from within the widget class (subclass of AbstractWidget) ?
>
> Just create your own MapEvent with x, y fields.
Thanks for the suggestion, I'll work on it.
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: ImageMap widget for CForms
Posted by Luca Morandini <lu...@tin.it>.
Vadim Gritsenko wrote:
> Luca Morandini wrote:
>
>> Thanks for the suggestion, I'll work on it.
>
> MapEvent will allow to use event.x, event.y or some such instead of
> 'cocoon.request.getParameter("map.y")', which is eww ;-)
Understood: I'll amend the ImageMap widget early next week.
Regards,
--------------------
Luca Morandini
www.lucamorandini.it
--------------------
Re: ImageMap widget for CForms
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Luca Morandini wrote:
> Vadim Gritsenko wrote:
>
>> Luca Morandini wrote:
>>
>>> function onClickMap () {
>>>
>>> var x= Number(cocoon.request.getParameter("map.x"));
>>> var y= Number(cocoon.request.getParameter("map.y"));
>>
>>
>> Eww!
>
>
> Ahem... what "Eww!", exactly, means ?
:-)
http://www.urbandictionary.com/define.php?term=eww
>>> BTW, I'd like mouse coordinates to be retrieved by querying the map
>>> widget rather than the request object... anyone knows a simple way to
>>> do this from within the widget class (subclass of AbstractWidget) ?
>>
>>
>> Just create your own MapEvent with x, y fields.
>
>
> Thanks for the suggestion, I'll work on it.
MapEvent will allow to use event.x, event.y or some such instead of
'cocoon.request.getParameter("map.y")', which is eww ;-)
Vadim