Skip to content
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

fix(context): add workspace option with layers when we export context #1660

Merged
merged 5 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -576,19 +576,14 @@ export class ContextService {
delete layerFound.sourceOptions[`source`];
delete layerFound.sourceOptions[`format`];
}
const opts = {
baseLayer: layerFound.baseLayer,
delete layerFound.source;
const opts: AnyLayerOptions = {
...layerFound,
title: layer.options.title,
zIndex: layer.zIndex,
igoStyle: {
styleByAttribute: layerFoundAs.igoStyle?.styleByAttribute,
clusterBaseStyle: layerFoundAs.igoStyle?.clusterBaseStyle
},
style: layerStyle,
clusterParam: layerFound[`clusterParam`],
visible: layer.visible,
opacity: layer.opacity,
sourceOptions: layerFound.sourceOptions
opacity: layer.opacity
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pelord @aziz-access, On jase... pensez-vous qu'il y a une raison pour ne pas exporter tous les options du layer? Par exemple:

Suggested change
};
const opts: AnyLayerOptions = {
...layerFound,
title: layer.options.title,
zIndex: layer.zIndex,
style: layerStyle,
visible: layer.visible,
opacity: layer.opacity,
};

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P-etre un lien avec l,API? aucune idée franchement, je ne me sers pas ce ce feature.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aziz-access Pense-tu que ce serait une bonne idée d'utiliser les modifs proposé dans mon commentaire. On délèguerait la responsabilité a l'API de bien gérer la donnée et nous on protègerais de future changements qu'on pourrait oublier.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oui bonne idée, on laisse la responsabilité à l'AP.

context.layers.push(opts);
} else {
Expand Down
Loading