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
I noticed that I cannot resize Transformer (not Text) after I change the fontSize property. If I make my text bigger with the font size, it's being "cut" due to invalid Text's size. Here is my update style code:
const id = this.selectedText._id;
const text = this.editor.textLayer.children.find((x) => x._id === id)! as Konva.Text;
const newFontSize = this.calculateFontSize(options.fontSize!);
text.setAttrs(options);
text.fontSize(newFontSize);
this.editor.transformer?.nodes([text]);
this.editor.transformer?.forceUpdate();
setTimeout(() => {
this.editor.textLayer.draw();
}, 50);
Nothing is null: text is an object, transformer is an object (there is only one transformer at the moment), editor is an object. Everything work but this.
The text was updated successfully, but these errors were encountered:
I found one of possible solutions: I am making a deep copy of the text with new fontSize value on init, and replace old text with the new one. But I don't think this is the proper solution.
Hi,
I noticed that I cannot resize Transformer (not Text) after I change the fontSize property. If I make my text bigger with the font size, it's being "cut" due to invalid Text's size. Here is my update style code:
Nothing is null:
text
is an object,transformer
is an object (there is only one transformer at the moment),editor
is an object. Everything work but this.The text was updated successfully, but these errors were encountered: