You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| uri <divclass="label basic required">Required</div> | string | The location of the image. |
483
-
| success <divclass="label basic required">Required</div> | function | The function that will be called if the image was successfully found and width and height retrieved. |
484
-
| failure | function | The function that will be called if there was an error, such as failing to retrieve the image. |
476
+
| <divclassName="wideColumn">Name</div> | Type | Description |
| uri <divclass="label basic required">Required</div> | string | The location of the image. |
485
479
486
480
---
487
481
@@ -490,10 +484,8 @@ In order to retrieve the image dimensions, the image may first need to be loaded
490
484
```tsx
491
485
staticgetSizeWithHeaders(
492
486
uri: string,
493
-
headers: {[index: string]: string},
494
-
success: (width:number, height:number) =>void,
495
-
failure?: (error:any) =>void,
496
-
): any;
487
+
headers: {[index: string]: string}
488
+
): Promise<{width: number, height: number}>;
497
489
```
498
490
499
491
Retrieve the width and height (in pixels) of an image prior to displaying it with the ability to provide the headers for the request. This method can fail if the image cannot be found, or fails to download. It also does not work for static image resources.
@@ -502,12 +494,10 @@ In order to retrieve the image dimensions, the image may first need to be loaded
502
494
503
495
**Parameters:**
504
496
505
-
| <divclassName="wideColumn">Name</div> | Type | Description |
| uri <divclass="label basic required">Required</div> | string | The location of the image. |
508
-
| headers <divclass="label basic required">Required</div> | object | The headers for the request. |
509
-
| success <divclass="label basic required">Required</div> | function | The function that will be called if the image was successfully found and width and height retrieved. |
510
-
| failure | function | The function that will be called if there was an error, such as failing to retrieve the image. |
497
+
| <divclassName="wideColumn">Name</div> | Type | Description |
0 commit comments