Skip to content

Commit 9d341f0

Browse files
committed
Fixed bug with text measurment
1 parent 75c3f77 commit 9d341f0

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

bower.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"test",
1212
"tests"
1313
],
14-
"version": "1.0.1",
1514
"description": "AnyChart NodeJS module provides an easy way to generate SVG, JPG and PNG images of the charts on the server side.",
1615
"homepage": "https://github.com/AnyChart/AnyChart-NodeJS",
1716
"license": "Apache-2.0",
@@ -29,7 +28,7 @@
2928
"opentype.js": "^0.6.6",
3029
"async": "^0.9.2",
3130
"es6-promise": "^4.0.5",
32-
"anychart": "7.13.0-dev-preview.0",
31+
"anychart": "7.14.0",
3332
"jsdom": "^9.9.1"
3433
}
3534
}

lib/anychart-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
doc.createElementNS = function(ns, tagName) {
6060
var elem = document.createElement(tagName);
6161
elem.getBBox = function() {
62-
var text = elem.innerHTML;
62+
var text = elem.textContent;
6363
var fontSize = parseFloat(elem.getAttribute('font-size'));
6464
var fontFamily = elem.getAttribute('font-family');
6565
if (fontFamily) fontFamily = fontFamily.toLowerCase();

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "anychart-nodejs",
33
"main": "./lib/anychart-node",
4-
"version": "1.1.0",
4+
"version": "1.2.0",
55
"description": "AnyChart NodeJS module provides an easy way to generate SVG, JPG and PNG images of the charts on the server side.",
66
"author": "AnyChart",
77
"title": "AnyChart NodeJS",
@@ -28,7 +28,7 @@
2828
"opentype.js": "^0.6.6",
2929
"async": "^0.9.2",
3030
"es6-promise": "^4.0.5",
31-
"anychart": "^7.13.0",
31+
"anychart": "^7.14.0",
3232
"jsdom": "^9.9.1"
3333
}
3434
}

0 commit comments

Comments
 (0)