Constructor
new ThumbnailWidth(cssWidth, cssHeight, real)
#
Parameters:
| Name | Type | Description |
|---|---|---|
cssWidth |
number | width in CSS pixels |
cssHeight |
number | height in CSS pixels |
real |
number | width in real pixels |
Properties
cssHeight :number
#
Height of the thumbnail on the screen, in CSS pixels. This is the number which can be plugged into UI code like $element.height(x).
Type:
- number
cssWidth :number
#
Width of the thumbnail on the screen, in CSS pixels. This is the number which can be plugged into UI code like $element.width(x).
Type:
- number
real :number
#
"Real" width of the thumbnail. This is the number you need to use in API requests when obtaining the thumbnail URL. This is usually larger than the screen width, since downscaling images via CSS looks OK but upscaling them looks ugly. However, for images where the full size itself is very small, this can be smaller than the screen width, since we cannot create a thumbnail which is larger than the original image. (In such cases the image is just positioned to the center of the intended area and the space around it is left empty.)
Type:
- number