-
Notifications
You must be signed in to change notification settings - Fork 7
Feat/dynamic layers v2 #24
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
Conversation
CindyvdVries
left a comment
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.
Looks good! thanks!
| import { action } from '@storybook/addon-actions'; | ||
| import { withKnobs, text, number, boolean, array, select, color, date, button } from '@storybook/addon-knobs'; | ||
| import { linkTo } from '@storybook/addon-links'; | ||
| import { storiesOf } from '@storybook/vue'; |
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.
more general thing, with or without ; ?
| return { | ||
| template: dynamicLayersTemplate, | ||
| data: () => ({ | ||
| style: 'mapbox://styles/global-data-viewer/cjtss3jfb05w71fmra13u4qqm', |
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.
this is from a specific project? is it useful to relate that to this general package, even if only in a story?
This is essentially an improved version of #14.
It has the same functionality:
"Currently it is not possible to add layers dynamically, because deferredMountedTo only gets called on initialisation of the map. In this PR the (re)rendering is handled internaly in the v-mapbox-layer component, by either calling mounted or deferredMountedTo. When the layer is loaded later than the map is initialised, it uses mounted, otherwise deferredMountedTo."
This PR also comes with a storybook story.