-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gslux 705 modify feature selection and sync between map and UI #148
Conversation
all tests are fixed, would be good to merge this also. |
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.
// opening the last item is directly done in addDrawnFeature in draw store via activeFeatureId | ||
/* watch( | ||
* features, | ||
* (newFeatures, oldFeatures) => { | ||
* // Last added feature is unfold by default | ||
* if (oldFeatures === undefined || newFeatures.length > oldFeatures.length) { | ||
* const currentFeature = | ||
* newFeatures[oldFeatures === undefined ? 0 : newFeatures.length - 1] | ||
* // currentOpenedFeature.value = currentEditingFeature.value = | ||
* currentFeature.id | ||
* } | ||
* }, | ||
* { immediate: true } | ||
* ) | ||
* */ |
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.
I guess we can get rid of this here then.
// const drawnFeatureToFeature = function ( | ||
// drawnFeature: DrawnFeature | ||
// ): Feature<Geometry> { | ||
// const olFeature = drawnFeature.olFeature | ||
// olFeature.set('name', drawnFeature.label) | ||
// return olFeature | ||
// } | ||
|
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.
Can we also delete the commented lines below in featuresToUrl
?
@@ -35,6 +36,8 @@ class StatePersistorFeaturesService implements StatePersistorService { | |||
|
|||
restore() { | |||
const { drawnFeatures } = storeToRefs(useDrawStore()) | |||
// initialise map listeners for feature selection | |||
useDrawSelect() |
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.
It feels a little strange to call a composable in a state persistor, but I agree that it makes sense to concentrate this logic in a composable and don't have a better suggestion neither.
Yes, I would also like to see the other PR merged first. On my local server, the selected labels appear bigger. We can check it with the CD version before merging into main |
GitHub Pages links: * Luxembourg-geoportail: https://geoportail-luxembourg.github.io/luxembourg-geoportail/GSLUX-705_modify_feature_rebased2/ |
start of work for selecting and editing features