EaselJS app with Require, getBounds() returns null.
See original GitHub issueI have some text created like this:
dialogText = new createjs.Text(text, 'bold ' + (28 * scale) + 'px Calibri', '#FFFFFF');
Then later on I use dialogText.getBounds()
which returns null
.
I try console logging dialogText
and I can see that it is set and there is a value _bounds
which reads null.
When I use the same javascript without requirejs it seems to work fine.
Any tips of what might be causing my issue?
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
createjs - Why does easeljs stage.getBounds() return null?
It looks like the stage object can't calculate their own bounds. In the same getBounds() documentation it appears the following:.
Read more >EaselJS v1.0.0 API Documentation : DisplayObject - CreateJS
DisplayObject is the base class for all display classes in the EaselJS library. ... draw; getBounds; getCacheDataURL; getConcatenatedDisplayProps ...
Read more >EaselJS v1.0.0 API Documentation : Container - CreateJS
A Container is a nestable display list that allows you to work with compound display elements. For example you could group arm, leg,...
Read more >EaselJS v1.0.0 API Documentation : Stage - CreateJS
A stage is the root level Container for a display list. Each time its tick method is called, it will render its display...
Read more >easeljs/display/DisplayObject.js - CreateJS
cacheCanvas = null;; /**; * If a cache has been made, this returns the class ... containing any arguments that were passed to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Your
dialogText
has no text in it, so it’s returning null forgetBounds()
@MannyC wow thanks so much!