Commit fae3bb1c authored by Sascha Herzinger's avatar Sascha Herzinger
Browse files

fixed issue where font was not included in SVG style inlining

parent 8eb9bace
......@@ -6955,6 +6955,36 @@
}
}
},
"url-loader": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-1.1.2.tgz",
"integrity": "sha512-dXHkKmw8FhPqu8asTc1puBfe3TehOCo2+RmOOev5suNCIYBcT626kxiWg1NBVkwc4rO8BGa7gP70W7VXuqHrjg==",
"dev": true,
"requires": {
"loader-utils": "^1.1.0",
"mime": "^2.0.3",
"schema-utils": "^1.0.0"
},
"dependencies": {
"mime": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-2.4.0.tgz",
"integrity": "sha512-ikBcWwyqXQSHKtciCcctu9YfPbFYZ4+gbHEmE0Q8jzcTYQg5dHCr3g2wwAZjPoJfQVXZq6KXAjpXOTf5/cjT7w==",
"dev": true
},
"schema-utils": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
"integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
"dev": true,
"requires": {
"ajv": "^6.1.0",
"ajv-errors": "^1.0.0",
"ajv-keywords": "^3.1.0"
}
}
}
},
"url-parse": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.4.4.tgz",
......
/* roboto-regular - latin */
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
src: local('Roboto'), local('Roboto-Regular'),
url('../fonts/roboto-v18-latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
url('../fonts/roboto-v18-latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}
.ada-chart text {
font-family: Roboto, sans-serif;
}
@font-face {
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 1rem;
src: url(Roboto.woff2) format('woff2');
}
......@@ -33,9 +33,7 @@ export default class {
for (let i = 0; i < document.styleSheets.length; i += 1) {
const sheet = document.styleSheets[i];
Object.keys(sheet.cssRules).forEach((key) => {
if (sheet.cssRules[key] instanceof CSSStyleRule) {
rules.push(sheet.cssRules[key].cssText);
}
rules.push(sheet.cssRules[key].cssText);
});
}
return rules;
......
......@@ -15,7 +15,9 @@ export default class extends Chart {
this.canvas = d3.select(container)
.append('canvas')
.attr('class', 'ac-heatmap-canvas');
this.svg = d3.select(container).append('svg')
this.svg = d3.select(container)
.append('svg')
.attr('class', 'ada-chart')
.append('g');
this.vertHL = d3.select(container)
.append('div')
......
......@@ -14,7 +14,7 @@ export default class extends Chart {
this.hiddenCanvas = document.createElement('canvas');
this.svg = d3.select(container)
.append('svg')
.attr('class', 'ac-scatter-svg')
.attr('class', 'ac-scatter-svg ada-chart')
.append('g');
this.tooltip = d3.select(container)
......
......@@ -27,13 +27,8 @@ module.exports = (env, argv) => ({
],
},
{
test: /\.(woff2?|ttf)$/,
exclude: /node_modules/,
loader: 'base64-inline-loader',
options: {
limit: 1000,
name: '[name].[ext]',
},
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader',
},
],
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment