diff --git a/package-lock.json b/package-lock.json index 8dd4426e..8069f88e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19787,9 +19787,9 @@ } }, "ember-leaflet-marker-cluster": { - "version": "1.0.0-beta.1", - "resolved": "https://registry.npmjs.org/ember-leaflet-marker-cluster/-/ember-leaflet-marker-cluster-1.0.0-beta.1.tgz", - "integrity": "sha512-pPIX7yfAeqLSCs8qFRVz8AvLkVFE5MHzZMyibQPu3Giab/iVl4lNGAseuL2V3kM5nD5c15jhFZ3YCLNeaL4R2Q==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/ember-leaflet-marker-cluster/-/ember-leaflet-marker-cluster-1.0.0.tgz", + "integrity": "sha512-0/1hWY7y5TsZQZUyi3+qEmX4eH9zpsQ8TbsiqZSht/yqjIwJd9A2QUJ3speO5jCLQPApFvoDliNgJAsj1d6xeA==", "dev": true, "requires": { "broccoli-debug": "^0.6.5", diff --git a/package.json b/package.json index 460e8e05..e672b23e 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", "ember-fetch": "^8.0.4", - "ember-leaflet-marker-cluster": "1.0.0-beta.1", + "ember-leaflet-marker-cluster": "^1.0.0", "ember-load-initializers": "^2.1.2", "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^6.2.0", diff --git a/tests/dummy/app/pods/docs/addons/template.md b/tests/dummy/app/pods/docs/addons/template.md index bcd50ef6..d890c444 100644 --- a/tests/dummy/app/pods/docs/addons/template.md +++ b/tests/dummy/app/pods/docs/addons/template.md @@ -85,14 +85,27 @@ The `registerComponent` method accepts two arguments: - an options object. Only the `as` option is supported at the moment. The `as` option is the name under which the component will yielded as from the `` component. -### Setting up the a new layer's template +### Yielding additional components from new components -If you're extending from `BaseLayer` (or another layer that extends from it), you might have to set up some boilerplate -on your template. This is required because in glimmer components and octane we don't have observers. So that means -that observing values requires the usage of [`ember-render-helpers`](https://github.com/buschtoens/ember-render-helpers), which -requires the template (better solutions are welcome). +It is usual for new components to yield additional components in addons. In the example above, there is a +new `` component that yields a `` component. -Check the `BaseLayer`'s template on github for more information on what the `BaseLayer` does by default. +If you're extending from `BaseLayer` (or another layer that extends from it), there is a special property you can +use called `componentsToYield`. This should be an array of objects that describes which components you +want to yield. You should use it like: + +```js +// addon/components/market-cluster-layer.js +componentsToYield = [ + ...this.componentsToYield, + { name: 'marker-layer', as: 'marker' } +]; +``` + +- `name` is the name of the component itself +- `as` is the key that you want to put it under in the yielded hash (the key will default to the `name` value if an empty `as` is provided) + +`BaseLayer`'s template will make sure to yield these components correctly for you. ### Including the leaflet plugin