Move Plotly Shadow DOM Hack to helper, refs plotly/plotly.js#1433
This commit is contained in:
parent
d6da5cedd8
commit
ef2249a58d
2 changed files with 15 additions and 12 deletions
12
lib/plotly-shadowdom.js
Normal file
12
lib/plotly-shadowdom.js
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
// 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);
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue