Skip to content

Commit b274a21

Browse files
authored
Fix random test failures (#546)
1 parent e46405a commit b274a21

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"scripts": {
2020
"build": "rollup -c",
2121
"dev": "karma start --auto-watch --no-single-run --browsers chrome",
22+
"dev:ff": "karma start --auto-watch --no-single-run --browsers firefox",
2223
"docs": "npm run build && vuepress build docs --no-cache",
2324
"docs:dev": "npm run build && vuepress dev docs --no-cache",
2425
"lint": "concurrently \"npm:lint-*\"",

src/helpers/helpers.canvas.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function measureLabelSize(ctx, options) {
4242
}
4343
const font = toFont(options.font);
4444
const lines = isArray(content) ? content : [content];
45-
const mapKey = lines.join() + font.string;
45+
const mapKey = lines.join() + font.string + (ctx._measureText ? '-spriting' : '');
4646
if (!widthCache.has(mapKey)) {
4747
ctx.save();
4848
ctx.font = font.string;

test/fixtures/label/boxLocation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module.exports = {
2-
tolerance: 0.0170,
2+
threshold: 0.2,
3+
tolerance: 0.0071,
34
config: {
45
type: 'scatter',
56
options: {
-166 Bytes
Loading

0 commit comments

Comments
 (0)