Skip to content

Commit

Permalink
xylabel: PRE mode
Browse files Browse the repository at this point in the history
  • Loading branch information
binzume committed Nov 16, 2023
1 parent 0b26b27 commit 7710bc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aframe-xywidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,15 @@ AFRAME.registerComponent('xylabel', {
}
if (data.renderingMode == 'auto' && !/[\u0100-\uDFFF]/.test(value)) {
let textData = Object.assign({}, data, {
// whiteSpace: 'pre',
wrapCount: wrapCount,
width: w,
height: h,
});
delete textData['resolution'];
delete textData['renderingMode'];
el.setAttribute('text', textData);
el.components.text.data.mode='pre'; // workaround
setTimeout(() => {
let textObj = el.getObject3D('text');
if (textObj) {
Expand Down

0 comments on commit 7710bc4

Please sign in to comment.