cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luca Morandini <luca.morandi...@tin.it>
Subject ImageMap: is it still "eww !" ?
Date Wed, 08 Jun 2005 17:48:50 GMT
The form definition:
<fd:imagemap id="map">
	<fd:source>test.gif</fd:source>
	<fd:hint>
		<i18n:text>zoomInImage.hint.mapButton</i18n:text>
	</fd:hint>
	<fd:on-action>
		<javascript>onClickMap(event);</javascript>
	</fd:on-action>
</fd:imagemap>

The flow:
function onClickMap (event) {

	var x= event.getX();
	var y= event.getY();
	var uri;
	
	uri= map.zoomIn(new Rectangle(new Point(x, y), 1, 1));
	if ( uri != "map.zoominTooFar" ) {
		event.getSource().setImageURI(uri);
	}
}

How about this, Vadim ? ;)

Regards,

--------------------
    Luca Morandini
www.lucamorandini.it
--------------------


Mime
View raw message