You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is no way how to use "wordWrap: false" and place new lines by the '\n' charecter.
If we use -wordWrap: false, then we get "infinity" width of textContainer. It leads to disappearing texts at all.
The text was updated successfully, but these errors were encountered:
Hi. Can you send me an example of this? I don't see the issue when I'm testing it.
From demo/index.html
// Wrapping and Alignment
const wrappingText = `Global word wrap and alignment properties are controlled by the "default" style, and can\'t be overridden by other styles.`;
const wrappingStyle = {
default: {
fontFamily: "Arial",
fontSize: "24px",
fill: "#CC6600",
wordWrap: true,
wordWrapWidth: 150,
align: "right",
},
};
let wrapping = new TaggedText(wrappingText, wrappingStyle, {});
const nonWrappingText = `This one doesn't have \`wordWrap\` so it just keeps going and going and going off the edge! \nHowever, you can use line breaks to manually wrap it.`;
const nonWrappingStyle = {
default: {
fontFamily: "Arial",
fontSize: "17px",
fill: "#669900",
wordWrap: false, // <<<<<<<<<<<<
wordWrapWidth: 150,
align: "left",
},
};
let nonWrapping = new TaggedText(nonWrappingText, nonWrappingStyle);
nonWrapping.x = 30;
nonWrapping.y = 330;
nonWrapping.textContainer.width; // 693
Thank you for an example. If we will use align: "center" for the nonWrappingText we get an infinite textbox. And I can`t choose a width of the textContainer.
It is no way how to use "wordWrap: false" and place new lines by the '\n' charecter.
If we use -wordWrap: false, then we get "infinity" width of textContainer. It leads to disappearing texts at all.
The text was updated successfully, but these errors were encountered: