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 src/lib/svg_text_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ function convertToSVG(_str) {
// most of the svg css users will care about is just like html,
// but font color is different. Let our users ignore this.
extraStyle = extraStyle[1].replace(/(^|;)\s*color:/, '$1 fill:');
style = (style ? style + ';' : '') + encodeForHTML(extraStyle);
style = encodeForHTML(extraStyle) + (style ? ';' + style : '');
}

return tspanStart + (style ? ' style="' + style + '"' : '') + '>';
Expand Down
Binary file modified test/image/baselines/annotations.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion test/image/mocks/annotations.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
"ax":-34,"ay":37,"arrowsize":2,"x":4,"y":1
},
{
"text":"All together","opacity":0.6,"arrowwidth":5,"arrowhead":3,"ax":-77,"ay":-5,
"text":"All together<br>with<sup style=\"font-family:raleway;fill:rgb(0,255,255)\">STYLE</sup>",
"opacity":0.6,"arrowwidth":5,"arrowhead":3,"ax":-77,"ay":-5,
"bordercolor":"rgb(255, 0, 0)","borderwidth":4,"bgcolor":"rgba(255,255,0,0.5)",
"font":{"color":"rgb(0, 0, 255)","size":20},
"arrowcolor":"rgb(166, 28, 0)","borderpad":3,"textangle":50,"x":5,"y":1
Expand Down