infoscreens/lib/plotly-shadowdom.js

13 lines
332 B
JavaScript
Raw Permalink Normal View History

// Hack for Shadow DOM compat
export default function injectCss(root) {
const styles = document.createElement('style');
styles.appendChild(document.createTextNode(`
.js-plotly-plot .plotly .main-svg {
position: absolute;
top: 0;
left: 0;
pointer-events: none;
}`));
root.appendChild(styles);
2017-11-30 21:50:19 +01:00
}