getVirtualSize();
The getVirtualSize method gets virtual table size in pixels.
This method returns a JSON object with the following fields: height - table height, width - table width.
To execute the example, the HTML page must contain the TabSheet component named tabSheet (see Example of Creating the TabSheet Component). Find virtual size of the table and real size for a table cell:
// Get table dimensions var measures = tabSheet.getMeasures(); // Get virtual table size in pixels var vSize = measures.getVirtualSize(); console.log("Table width: " + vSize.width + ", " + "Height: " + vSize.height); // Get real size of the A0 cell var rCoordSize = measures.getRealCoordSize(tabSheet.coord(0, 0)); console.log("Width of the A0 cell: " + rCoordSize.width + ", " + "Height: " + rCoordSize.height);
After executing the example the browser console shows table virtual size in pixels and real size for the A0 cell:
Table width: 633, height: 318
Width of A0 cell: 100, height: 50
See also: