This line : var cs = locWidget.getContentSize(); should be fixed: var cs = locWidget.getBoundingBox(); Of course there are some other lines should be fixed in this file (UILayoutManager.js)