Ticket #38 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

update LayerStore for layers option to be an alias of data ext option

Reported by: bbinet Assigned to:
Priority: major Milestone: 0.5
Component: GeoExt.data Version:
Keywords: LayerStore Cc:
State: Review

Description

layers is now handled as an alias of data, and loadData can be used to load new layers in LayerStore. listening on "load" and "clear" events. synchronization of layers from store and map is done in bind method, so that we can keep being synchronized after each new bind.

Attachments

patch_layer_store.diff (33.3 kB) - added by bbinet on 04/08/09 21:29:30.
patch-38-r369-A0.diff (11.6 kB) - added by elemoine on 04/09/09 00:11:49.
patch-38-r369-A1.diff (12.0 kB) - added by bbinet on 04/09/09 08:56:23.

Change History

04/08/09 21:29:30 changed by bbinet

  • attachment patch_layer_store.diff added.

04/08/09 21:31:34 changed by bbinet

this patch also remove LayerStoreMediator which is no longer needed since LayerStore exists.

04/09/09 00:11:49 changed by elemoine

  • attachment patch-38-r369-A0.diff added.

04/09/09 00:18:55 changed by elemoine

  • milestone set to 0.1.

Bruno, thanks for the patch.

patch-38-r369-A0.diff brings the following:

  • do not remove LayerStoreMediator as part of this patch (LayerStoreMediator relates to FeatureStore, not LayerStore)
  • reset LayerStore.js to DOS format (the dos2unix reformatting is unrelated to this ticket and makes the diff's unreadable)
  • move the LAYER_TO_MAP and MAP_TO_LAYER to the GeoExt.data.LayerStore namespace, so they're not present in every LayerStore instance
  • the LayerStore constructor no longer deals with the initDir option, this is all taken care by bind()
  • bind() receives an options object where initDir can be set, this will be useful when we'll want to pass other options to bind() (e.g. dir)
  • if initDir:0 is passed to bind() no initial sync is done (this is indicated in the API docs)
  • other misc changes

Tests still pass on FF3.

Please tell me if the new patch suits you.

04/09/09 08:56:23 changed by bbinet

  • attachment patch-38-r369-A1.diff added.

04/09/09 09:00:51 changed by bbinet

Thanks for reviewing and enhancing Eric.
This new patch is ok for me. I have just added a new test case for checking that no initial sync is done if initDir:0 is passed to bind().
Have a look to : patch-38-r369-A1.diff

04/09/09 09:27:40 changed by elemoine

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

(In [370]) update LayerStore for layers option to be an alias of data ext option, p=bbinet, r=me (closes #38)