Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"gl-line3d": "^1.1.0",
"gl-mat4": "^1.1.2",
"gl-mesh3d": "^1.2.0",
"gl-plot2d": "^1.1.9",
"gl-plot2d": "^1.2.0",
"gl-plot3d": "^1.5.1",
"gl-pointcloud2d": "^1.0.0",
"gl-scatter2d": "^1.2.0",
Expand Down
5 changes: 2 additions & 3 deletions src/plots/gl2d/scene2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,8 @@ proto.computeTickMarks = function() {

for(var j = 0; j < 2; ++j) {
for(var i = 0; i < nextTicks[j].length; ++i) {
// TODO add support for '\n' in gl-plot2d,
// For now, replace '\n' with ' '
nextTicks[j][i].text = convertHTMLToUnicode(nextTicks[j][i].text + '').replace(/\n/g, ' ');
// coercing tick value (may not be a string) to a string
nextTicks[j][i].text = convertHTMLToUnicode(nextTicks[j][i].text + '');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why the extra + '' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was there and I left it intact, thinking it was in place to coerce it into a string

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe nextTicks[j][i].text will always be a string. Let's 🔪 that + ''.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard npm run test-image-gl2d returned with errors when I did the 🔪

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha. Good to know. Revert the 🔪 and add a comment about the + ''.

}
}

Expand Down
Binary file modified test/image/baselines/gl2d_date_axes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.