[Seaside] Seaside 2.7 new image map api

Michel Bany michel.bany at gmail.com
Mon Feb 26 10:10:10 UTC 2007


On 25 Feb 2007, at 01:44 , Philippe Marschall wrote:

> - new image map api (see WAScreenshot)

I think this new api is not adequate.

1) code like this

	html map
		...
		with: [ ... ]

looks as if you were rendering a <map> element.

2) if we want to support the <map> and <area> elements, then
we would like to use

	html map with:
		[html area ...
		...
		html area ...].

and we have a name clash on the #map selector.

Again,  I would rather suggest

For the ismap case :

    html imageMap
        ... ;
        image: [:image | image ...];
        callback: [:aPoint | self clickedAt: aPoint]

For the usemap case :

    html imageWithMap
        ... ;
        image: [:image | image ....];
        map:
		[html area ...
		html area ...      ]

With some new api for the <tag> and <area> tag
        html area
            callback: [self inform: 'Rectangular area 1'];
            shape: (Rectangle origin: 40 at 40 corner: 100 at 400);
            title: 'Rectangular area'.
and support for Rectangle, Circle and Polyline

See my experimental implementation for Squeak with unit tests and a demo
here ftp://ftp.bany.fr/seaside/SeasideTests-mb.4.mcz




More information about the Seaside mailing list