Great Find! And great patch!
Thanks guys for taking care of this. I've applied the patch to trunk.
--Erik
On 11/15/07, Frédéric Junod <[EMAIL PROTECTED]> wrote:
> Le Thu, 15 Nov 2007 14:18:58 +0800,
> "li ethan" <[EMAIL PROTECTED]> a écrit :
>
> > Dear listers!
> > Did anyone notice there might be a bug at addPopup:
> > function(popup, exclusive) in Map.js.
> > this method first remove all the popups when the exclusive flag is
> > true,and I think there is a problem is this statements
> > for(var i=0; i < this.popups.length; i++) {
> > this.removePopup(this.popups[i]);
> > }
> >
> > and the removePopup method use array.splice(i,1) to cut off the
> > array,there might have some elements in this array never get
> > removed,like the element in index 1 will not be removed because it be
> > shift to index 0 after first loop.Am I correct?
>
> You're correct ...
>
> The loop should be:
>
> for (var i = this.popups.length - 1; i >= 0; --i) {
> this.removePopup(this.popups[i]);
> }
>
> I've opened a ticket for that, http://trac.openlayers.org/ticket/1149
>
> Regards,
>
> fredj
>
> --
> Frédéric Junod
> Camptocamp SA
> _______________________________________________
> Dev mailing list
> [email protected]
> http://openlayers.org/mailman/listinfo/dev
>
_______________________________________________
Dev mailing list
[email protected]
http://openlayers.org/mailman/listinfo/dev