mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 15:25:07 +01:00
Changelog entry and doc refresh for #2397
This commit is contained in:
@@ -658,7 +658,8 @@ function raw () {
|
||||
* @param {number} [options.skipBlanks=-1] threshold to skip tile generation, a value 0 - 255 for 8-bit images or 0 - 65535 for 16-bit images
|
||||
* @param {string} [options.container='fs'] tile container, with value `fs` (filesystem) or `zip` (compressed file).
|
||||
* @param {string} [options.layout='dz'] filesystem layout, possible values are `dz`, `iiif`, `zoomify` or `google`.
|
||||
* @param {boolean} [options.centre=false] center image in tile.
|
||||
* @param {boolean} [options.centre=false] centre image in tile.
|
||||
* @param {boolean} [options.center=false] alternative spelling of centre.
|
||||
* @returns {Sharp}
|
||||
* @throws {Error} Invalid parameters
|
||||
*/
|
||||
@@ -728,8 +729,9 @@ function tile (options) {
|
||||
this.options.tileSkipBlanks = 5;
|
||||
}
|
||||
// Center image in tile
|
||||
if (is.defined(options.centre) || is.defined(options.center)) {
|
||||
this._setBooleanOption('tileCentre', options.centre || options.center);
|
||||
const centre = is.bool(options.center) ? options.center : options.centre;
|
||||
if (is.defined(centre)) {
|
||||
this._setBooleanOption('tileCentre', centre);
|
||||
}
|
||||
}
|
||||
// Format
|
||||
|
||||
Reference in New Issue
Block a user