Seaside 2.7 new image map api

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside 2.7 new image map api

Michel Bany

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@40 corner: 100@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


_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside 2.7 new image map api

Philippe Marschall
2007/2/26, Michel Bany <[hidden email]>:

>
> 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.

I agree that the #map selector is crap, but that can be fixed easily.
I disagree that the api is not adequate.

> 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]

You're doing a #with: without a #with:. I think this is very confusing.

> 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@40 corner: 100@400);
>             title: 'Rectangular area'.
> and support for Rectangle, Circle and Polyline

Do you have any customer that needs this? If no then I would rather
wait with something like this until someone really needs it. Once that
is the case I would prefer it to be an external package or reimplement
the shape classes in the Seaside 'namespace' . We don't need more
external dependencies, especially not on graphics.

Philippe

> See my experimental implementation for Squeak with unit tests and a demo
> here ftp://ftp.bany.fr/seaside/SeasideTests-mb.4.mcz
>
>
> _______________________________________________
> Seaside mailing list
> [hidden email]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: Seaside 2.7 new image map api

Michel Bany

On 26 Feb 2007, at 11:40 , Philippe Marschall wrote:

>> 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@40 corner: 100@400);
>>             title: 'Rectangular area'.
>> and support for Rectangle, Circle and Polyline
>
> Do you have any customer that needs this?

Carl Gundel was recently asking for this.
See http://lists.squeakfoundation.org/pipermail/seaside/2007-February/ 
010588.html
Not sure if he still had the need for this though.
Cheers,
Michel.


> If no then I would rather
> wait with something like this until someone really needs it. Once that
> is the case I would prefer it to be an external package or reimplement
> the shape classes in the Seaside 'namespace' . We don't need more
> external dependencies, especially not on graphics.

_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside