Conversation
3a240e2 to
8fa2cf2
Compare
web-mapviewer
|
||||||||||||||||||||||||||||
| Project |
web-mapviewer
|
| Branch Review |
fix-pb-1681-vue-warnings
|
| Run status |
|
| Run duration | 05m 18s |
| Commit |
|
| Committer | Pascal Barth |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
20
|
|
|
0
|
|
|
253
|
| View all changes introduced in this branch ↗︎ | |
| <div> | ||
| <slot /> | ||
| </div> |
There was a problem hiding this comment.
Why would adding an empty <div> fix an error?
There was a problem hiding this comment.
The reason for this error is that when adding properties to the DrawingMeasureInteraction component, vue doesn't know to which root html element these properties should be added, this can happen when there are two root elements. Therefore when you only have one root element, in this case the div, in the component vue knows now where to add the properties. See https://mokkapps.de/vue-tips/use-fallthrough-attributes here they propose to use v-bind, but when i tried to use it it did not bind the properties correctly so i added a root element instead. I should probably add a comment to explain this in the code
There was a problem hiding this comment.
I think this is not the proper fix for this warning. The issue was that we are giving startingFeature prop to all interaction component, even to those that do not declare it.
I've pushed a commit that should fix this
cac2e78 to
5e31c51
Compare
5e31c51 to
1d46e97
Compare
Dynamically configures props for specialized drawing interactions based on the current edit mode. This allows passing specific properties, such as the starting feature for line extensions, to the appropriate interaction component, and not to those that do not need it (which would raise a Vue warning for extraneous props)
one that was raised because we are using an obsolete `watch(fn, options?)` signature the second because some external WMS features didn't have any title, fallback to the feature ID if none is defined
954b169 to
1c5f5a3
Compare
Test link