| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
| AbsoluteTextElement.prototype.addText = function ( text, yShift, prefix, suffix ){ | ||
| if ( text ) { | ||
| this.addTextline(text, this.CSS_CLASSES.default, yShift, prefix, suffix); | ||
| AbsoluteTextElement.prototype.addText = function (text, yShift, prefix, suffix) { |
There was a problem hiding this comment.
Main changes are done there. Rest all are due to the formatter in VSCode.
Sorry, something went wrong.
|
@vitalis-wiens The only 2 files that I changed are AbsoluteTextElement.js and CenteringTextElement.js |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #82
As pointed out in the issue thread, I have implemented the solution where the names are split based on the whitespace and each word is then displayed in separate lines.
The issues arises here in src/webvowl/js/util/:
CenteringTextElement.prototype.addTextline = function ( text, style, prefix, postfix ){ var truncatedText = textTools.truncate(text, this._textBlock().datum().textWidth(), style);AbsoluteTextElement.prototype.addTextline = function ( text, style, yShift, prefix, postfix ){ var truncatedText = textTools.truncate(text, this._textBlock().datum().textWidth(yShift), style);Here, the text is truncated. If we split the text based on the white spaces and then call addTextLine, the issue gets resolved.
Screenshots:

Before:
After:
