Skip to content
Snippets Groups Projects
Commit 11c69afc authored by Tom Robinson's avatar Tom Robinson
Browse files

Fix dashboard grid background image for Chrome 72

parent a7c44355
Branches
Tags
No related merge requests found
......@@ -228,11 +228,12 @@ export default class GridLayout extends Component {
}
}
// generate one row of the grid, it will repeat because it's a background image
getGridBackground() {
let { margin, cols } = this.props;
let cellSize = this.getCellSize();
return (
`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='${cellSize.width *
const { margin, cols } = this.props;
const cellSize = this.getCellSize();
const svg =
`<svg xmlns='http://www.w3.org/2000/svg' width='${cellSize.width *
cols}' height='${cellSize.height}'>` +
_(cols)
.times(
......@@ -246,8 +247,8 @@ export default class GridLayout extends Component {
)}' height='${cellSize.height - margin - 3}'/>`,
)
.join("") +
`</svg>")`
);
`</svg>`;
return `url("data:image/svg+xml;utf8,${encodeURIComponent(svg)}")`;
}
render() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment