Copy link to clipboard
Copied
I created a multiple text with style justify and have to use createjs .DOMElement for this style, because property a textAlign doesn' t include a style justify for createjs.Text.
How I get width/height for multiple text?
work
var txt = new createjs.Text("", "18px Courier", "111");
stage.addChild(txt);
var bounds = txt.getBounds();
doesn't work
var e = document.createElement("div");
e.style = .....
document.body.appendChild(e);
var content = new createjs.DOMElement(e);
stage.addChild(content);
var bounds = content .getBounds(); // here bounds == null
getBounds() is a CreateJS canvas function, so of course it doesn't work with DOM elements.
Copy link to clipboard
Copied
getBounds() is a CreateJS canvas function, so of course it doesn't work with DOM elements.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now