Skip to content

Commit 804fd90

Browse files
committed
Remove unnecessary whitespace.
1 parent a31d158 commit 804fd90

1 file changed

Lines changed: 26 additions & 23 deletions

File tree

README.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -240,100 +240,103 @@ Defines the minimum height of the img/canvas element.
240240

241241
The width of the sub-rectangle of the source image to draw into the destination
242242
canvas.
243-
Defaults to the source image width and requires `canvas: true`.
243+
Defaults to the source image width and requires `canvas: true`.
244244

245245
### sourceHeight
246246

247247
The height of the sub-rectangle of the source image to draw into the destination
248248
canvas.
249-
Defaults to the source image height and requires `canvas: true`.
249+
Defaults to the source image height and requires `canvas: true`.
250250

251251
### top
252252

253253
The top margin of the sub-rectangle of the source image.
254-
Defaults to `0` and requires `canvas: true`.
254+
Defaults to `0` and requires `canvas: true`.
255255

256256
### right
257257

258258
The right margin of the sub-rectangle of the source image.
259-
Defaults to `0` and requires `canvas: true`.
259+
Defaults to `0` and requires `canvas: true`.
260260

261261
### bottom
262262

263263
The bottom margin of the sub-rectangle of the source image.
264-
Defaults to `0` and requires `canvas: true`.
264+
Defaults to `0` and requires `canvas: true`.
265265

266266
### left
267267

268268
The left margin of the sub-rectangle of the source image.
269-
Defaults to `0` and requires `canvas: true`.
269+
Defaults to `0` and requires `canvas: true`.
270270

271271
### contain
272272

273273
Scales the image up/down to contain it in the max dimensions if set to `true`.
274-
This emulates the CSS feature [background-image: contain](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Scaling_background_images#contain).
274+
This emulates the CSS feature
275+
[background-image: contain](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Scaling_background_images#contain).
275276

276277
### cover
277278

278279
Scales the image up/down to cover the max dimensions with the image dimensions
279280
if set to `true`.
280-
This emulates the CSS feature [background-image: cover](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Scaling_background_images#cover).
281+
This emulates the CSS feature
282+
[background-image: cover](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Scaling_background_images#cover).
281283

282284
### aspectRatio
283285

284286
Crops the image to the given aspect ratio (e.g. `16/9`).
285-
Setting the `aspectRatio` also enables the `crop` option.
287+
Setting the `aspectRatio` also enables the `crop` option.
286288

287289
### pixelRatio
288290

289291
Defines the ratio of the canvas pixels to the physical image pixels on the
290292
screen.
291-
Should be set to `window.devicePixelRatio` unless the scaled image is not rendered
292-
on screen.
293-
Defaults to `1` and requires `canvas: true`.
293+
Should be set to `window.devicePixelRatio` unless the scaled image is not
294+
rendered on screen.
295+
Defaults to `1` and requires `canvas: true`.
294296

295297
### downsamplingRatio
296298

297299
Defines the ratio in which the image is downsampled.
298-
By default, images are downsampled in one step. With a ratio of `0.5`, each step
300+
By default, images are downsampled in one step. With a ratio of `0.5`, each step
299301
scales the image to half the size, before reaching the target dimensions.
300-
Requires `canvas: true`.
302+
Requires `canvas: true`.
301303

302304
### imageSmoothingEnabled
303305

304306
If set to `false`,
305307
[disables image smoothing](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingEnabled).
306-
Defaults to `true` and requires `canvas: true`.
308+
Defaults to `true` and requires `canvas: true`.
307309

308310
### imageSmoothingQuality
309311

310312
Sets the
311313
[quality of image smoothing](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/imageSmoothingQuality).
312-
Possible values: `'low'`, `'medium'`, `'high'`
313-
Defaults to `'low'` and requires `canvas: true`.
314+
Possible values: `'low'`, `'medium'`, `'high'`
315+
Defaults to `'low'` and requires `canvas: true`.
314316

315317
### crop
316318

317319
Crops the image to the maxWidth/maxHeight constraints if set to `true`.
318-
Enabling the `crop` option also enables the `canvas` option.
320+
Enabling the `crop` option also enables the `canvas` option.
319321

320322
### orientation
321323

322324
Transform the canvas according to the specified Exif orientation, which can be
323325
an `integer` in the range of `1` to `8` or the boolean value `true`.
324-
When set to `true`, it will set the orientation value based on the EXIF data of
326+
When set to `true`, it will set the orientation value based on the EXIF data of
325327
the image, which will be parsed automatically if the exif library is available.
326328

327329
Setting `orientation` to an integer in the range of `2` to `8` enables the
328330
`canvas` option.
329-
Setting `orientation` to `true` enables the `canvas` and `meta` options, unless
330-
the browser supports automatic image orientation (see [browser support for image-orientation](https://caniuse.com/#feat=css-image-orientation)).
331+
Setting `orientation` to `true` enables the `canvas` and `meta` options, unless
332+
the browser supports automatic image orientation (see
333+
[browser support for image-orientation](https://caniuse.com/#feat=css-image-orientation)).
331334

332335
### meta
333336

334337
Automatically parses the image meta data if set to `true`.
335-
The meta data is passed to the callback as part of the second argument.
336-
If the file is given as URL and the browser supports the
338+
The meta data is passed to the callback as part of the second argument.
339+
If the file is given as URL and the browser supports the
337340
[fetch API](https://developer.mozilla.org/en/docs/Web/API/Fetch_API), fetches
338341
the file as Blob to be able to parse the meta data.
339342

0 commit comments

Comments
 (0)