-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(geo): manage layers and groups #1697
base: MSP-NEXT-TEMP
Are you sure you want to change the base?
Conversation
fc83bfa
to
b774742
Compare
Je l'ai identifié comme DRAFT parce qu'on est en mode test de notre côté. Ça serait bien que tu jette un oeil en code review tout de même voir si la structure/design vous convient. |
5c8b79d
to
9945103
Compare
Breaking changes: This is a major refactor of the way we manage layer in IGO - New class 'LayerController' to manage layers and offer 3 types of layers, 'systemLayers', 'baseLayers', 'treeLayers'. The systemLayers is the drawing layer, measurement layer and other vital layers for the library. Note that a systemLayer can also be found in the treeLayers. The treeLayers is the hierarchical representation for the LayerViewer. The list of treeLayers can also be accessed under the flattened variant. Finally these three types of layers are aggregated to provide a unified list names 'all' which allows to have the 'baseLayers', 'systemLayers' and the flattened list of the 'treeLayers' - The way we access the layers has also changed, we must go through the LayerController - The LayerViewer does not allow to display the baseLayer, the 'excludeBaselayers' is removed (cherry picked from commit 5ed250d6ca2b27d904de8d3354c11a981c64bf67) fix: lint fix(geo): remove duplicate layer from all (cherry picked from commit 42e4fa9b739c555f3c0f5b3a098ab14307aaae67) fix(build): circular dependency revert compilationMode to full fix(geo): circular dependencies - refactor Layer/LayerGroup fix(geo): time-filter-list remove BaseLayer fix(geo): layer - project custom action in the bottom panel refactor: change label for group fix(geo): move layer with linkedLayers add system layer in tree fix: any chore: update packages chore: update packages fix: test chore: fix path for build
9945103
to
a765ddb
Compare
- fix(geo): find by source id - fix(geo): raise/lower layer
- fix(geo): save expandable
- fix(geo): unhandled layer is added in the system layers
- fix: circular dependencies
(cherry picked from commit 760475bbbbe06b6fd1eadbf98e04cc210cc4e7bd)
(cherry picked from commit 27e87389de78721f5f0f0086bdd0673424967771)
(cherry picked from commit ec30c113e21d742e2a4b8ca38803973e38188f1c)
(cherry picked from commit d12325f64f0877df8d684f30e1e2555eddeca4e3)
(cherry picked from commit e4e7fb570d031c7fb65a6d34fea328c4299edb46)
(cherry picked from commit 1f955f6b2c53f192d87425330665fb3c35409853)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globalement, faire le tour pour ne plus conserver aucune mention du map.addLayer ou autre. Gerer tous les cas deprecated. Il me reste certains trucs a valider, dans le geo/...layer donc d'autres commentaires a suivre.
packages/common/drag-drop/src/tree-drag-drop/tree-drag-drop.directive.ts
Show resolved
Hide resolved
packages/common/drag-drop/src/tree-drag-drop/tree-drag-drop.directive.ts
Show resolved
Hide resolved
packages/common/form/src/form-field/form-field-text.component.html
Outdated
Show resolved
Hide resolved
@@ -56,6 +56,7 @@ export interface FormField<T extends FormFieldInputs = FormFieldInputs> | |||
} | |||
|
|||
export interface FormFieldOptions { | |||
initialValue?: unknown; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mais justement, le data sert a provider les initialvalues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faudrait que tu me donnes un exemple parce que moi ça ne fonctionnait pas de mon côté
projects/demo/src/app/geo/spatial-filter/spatial-filter.component.ts
Outdated
Show resolved
Hide resolved
projects/demo/src/app/geo/spatial-filter/spatial-filter.component.ts
Outdated
Show resolved
Hide resolved
projects/demo/src/app/geo/spatial-filter/spatial-filter.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Globalement, faire le tour pour ne plus conserver aucune mention du map.addLayer ou autre. Gerer tous les cas deprecated. Il me reste certains trucs a valider, dans le geo/...layer donc d'autres commentaires a suivre.
packages/geo/src/lib/layer/shared/layers/linked/linked-layer.utils.ts
Outdated
Show resolved
Hide resolved
(cherry picked from commit 71ca8e8bc569884ec3b5239559c4ea1de370ea5c)
packages/geo/src/lib/layer/layer-legend-item/layer-legend-item.component.scss
Show resolved
Hide resolved
packages/geo/src/lib/layer/layer-list-tool/layer-list-tool.service.spec.ts
Show resolved
Hide resolved
@@ -0,0 +1,23 @@ | |||
// import { ComponentFixture, TestBed } from '@angular/core/testing'; | |||
|
|||
// import { TEST_CONFIG } from '../../../../test-config'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_
packages/geo/src/lib/layer/layer-legend-item/layer-legend-item.component.scss
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
voir commentaires.
|
||
export interface LayerOptions { | ||
export interface LayerOptions extends BaseLayerOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sémantique, baselayerOption OU base layer option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est le Base class du LayerOptions, donc je dirais le BaseLayerOptions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ca porte a confusion ;(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LayerBaseOptions ou LayerOptionsBase?
} | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
add(parent?: LayerGroupBase, _soft?: boolean): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a quoi sert le _soft, aussi pour le remove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je vais revisiter cette partie, c'est un flag pour le softRemove lorsqu'on déplace un layer dans un groupe... Mais c'est un anti-pattern d'avoir une méthode avec un flag comme ça.
abstract lowerLayer(layer: Layer): void; | ||
abstract lowerLayers(layers: Layer[]): void; | ||
abstract moveLayer(layer: Layer, from: number, to: number): void; | ||
/** @deprecated find a way to remove this method. For now we discourage to use it until we find the way to remove it */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pourquoi deprecated?
Breaking changes: This is a major refactor of the way we manage layer in IGO
New class 'LayerController' to manage layers and offer 3 types of layers, 'systemLayers', 'baseLayers', 'treeLayers'. The systemLayers is the drawing layer, measurement layer and other vital layers for the library. Note that a systemLayer can also be found in the treeLayers. The treeLayers is the hierarchical representation for the LayerViewer. The list of treeLayers can also be accessed under the flattened variant. Finally these three types of layers are aggregated to provide a unified list names 'all' which allows to have the 'baseLayers', 'systemLayers' and the flattened list of the 'treeLayers'
The way we access the layers has also changed, we must go through the LayerController
- The LayerViewer does not allow to display the baseLayer, the 'excludeBaselayers' is removed