private void onSizeChanged() {
		float w = 0, h = 0;
		float x = 0, y = 0;
		if (imageLayers == null) return;
		for (int i = 0; i < heightDims.length; i++) {
			float yPlus = 0;
			for (int j = 0; j < widthDims.length; j++) {
				if (imageLayers[i][j] == null) continue;
				float width = getLength(j, this.width, widthDims);
				float height = getLength(i, this.height, heightDims);
				imageLayers[i][j].setTranslation(x, y);
				if (width > 0 && height > 0) {
					float displayWidth = width, displayHeight = height;
					if (graphics().ctx() == null) {
						//HTML5 Canvas shows some seams, so stretch a little more
						displayHeight += 0.5f;
						displayWidth += 0.5f;
					}
					imageLayers[i][j].setSize(displayWidth, displayHeight);
					imageLayers[i][j].setVisible(true);
					w = x + width;
					h = y + height;
					x += width;
					yPlus = height;
				} else {
					imageLayers[i][j].setVisible(false);
				}
			}
			y += yPlus;
			x = 0;
		}
		float scaleX = width / w;
		float scaleY = height / h;
		layer.setScale(scaleX, scaleY);
		
	}