Ticket #45 (closed enhancement: fixed)

Opened 11 months ago

Last modified 9 months ago

have map panel check items for addToMapPanel and removeFromMapPanel on items in add and remove

Reported by: tschaub Assigned to: elemoine
Priority: major Milestone: 0.5
Component: GeoExt.MapPanel Version:
Keywords: Cc:
State: Commit

Description

If we give MapPanel aware components methods like addToMapPanel and removeFromMapPanel, the MapPanel can call these methods in add and remove. Components would do (and undo) any special map related stuff in these methods, preparing themselves to be added (and removed) from the map panel.

The addToMapPanel name makes sense, but the Popup uses this for a different purpose. I'll submit a comprehensive patch that modifies Popup.js later.

Attachments

add_remove.patch (0.9 kB) - added by tschaub on 04/18/09 18:18:42.
let components deal with being added and removed
45.patch (6.5 kB) - added by tschaub on 05/23/09 08:55:23.
hooks for components to be added or removed from MapPanel

Change History

04/18/09 18:18:42 changed by tschaub

  • attachment add_remove.patch added.

let components deal with being added and removed

05/23/09 00:55:51 changed by tschaub

  • state changed from None to Review.

Tests pass in FF and IE.

What this comes down to from the app designers perspective is:

panel.add(popup);

instead of

popup.addToMapPanel(panel);

This gives us regular hooks for dealing with mappanel aware components (before they are added or removed from the panel).

This includes changes from #73.

05/23/09 08:55:23 changed by tschaub

  • attachment 45.patch added.

hooks for components to be added or removed from MapPanel

05/23/09 08:58:28 changed by tschaub

Updated patch applies cleanly to r862. Tests still pass.

05/23/09 09:24:15 changed by elemoine

I'd like to review this (probably the coming monday)

06/02/09 00:24:22 changed by elemoine

  • state changed from Review to Commit.

Looks good to me. Please commit.

06/02/09 00:27:19 changed by tschaub

Hey thanks Eric! Sent that email just before seeing this.

Thanks for the review.

06/02/09 00:37:37 changed by tschaub

  • status changed from new to closed.
  • resolution set to fixed.

(In [938]) Adding addToMapPanel and removeFromMapPanel hooks for components to do any specific processing before being added to or removed from the map panel container. This changes popup use so you write panel.add(popup) instead of popup.addToMapPanel(panel). r=elemoine (closes #45)