Skip to content
Snippets Groups Projects
Unverified Commit cde9de5e authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Merge pull request #9423 from metabase/fix-dash-grid-bg-for-chrome-72

Fix dashboard grid background image for Chrome 72
parents 8b061789 11c69afc
No related branches found
No related tags found
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.
Finish editing this message first!
Please register or to comment