Fix failure case when resizing a new model

This commit is contained in:
Ryan Huffman 2014-10-02 12:10:20 -07:00
parent b2229a9a9f
commit d7f383f74a

View file

@ -1233,6 +1233,8 @@ var toolBar = (function () {
var entityProperties = Entities.getEntityProperties(entityId);
var naturalDimensions = entityProperties.naturalDimensions;
checkCount++;
if (naturalDimensions.x == 0 && naturalDimensions.y == 0 && naturalDimensions.z == 0) {
if (checkCount < RESIZE_TIMEOUT / RESIZE_INTERVAL) {
Script.setTimeout(resize, RESIZE_INTERVAL);