I am trying to create an SVG wrapper using components. My app will allow users to render different SVGs from a list.
I would like those SVG to fit the screen; so I thought that I would get the DOM parent element width and height, before the component get inserted on the screen.
To do so here is the code I tried. It seems that the issue is related to the sag because when the tagName
is set to span
or even not set; things works as expected.
import Ember from 'ember';
export default Ember.Component.extend({ tagName: 'svg', attributeBindings: ['height', 'width', 'viewBox', 'xmlns', 'version'] });
Aucun commentaire:
Enregistrer un commentaire