canvas.gui.ScrollArea: check for valid content bounding box.
This commit is contained in:
parent
f90ecf08d2
commit
04c40a4232
1 changed files with 5 additions and 0 deletions
|
@ -45,6 +45,11 @@ gui.widgets.ScrollArea = {
|
||||||
{
|
{
|
||||||
# TODO only update on content resize
|
# TODO only update on content resize
|
||||||
var bb = me.getContent().getTransformedBounds();
|
var bb = me.getContent().getTransformedBounds();
|
||||||
|
|
||||||
|
if( bb[2] < bb[0] or bb[3] < bb[1] )
|
||||||
|
# Do nothing with invalid bounding box (probably no content yet)
|
||||||
|
return me;
|
||||||
|
|
||||||
var w = bb[2] - bb[0];
|
var w = bb[2] - bb[0];
|
||||||
var h = bb[3] - bb[1];
|
var h = bb[3] - bb[1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue