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. |
503
-
| 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. |
504
-
| failure | function | The function that will be called if there was an error, such as failing to retrieve the image. |
496
+
| <divclassName="wideColumn">Name</div> | Type | Description |
| uri <divclass="label basic required">Required</div> | string | The location of the image. |
505
499
506
500
---
507
501
@@ -510,10 +504,8 @@ In order to retrieve the image dimensions, the image may first need to be loaded
510
504
```tsx
511
505
staticgetSizeWithHeaders(
512
506
uri: string,
513
-
headers: {[index: string]: string},
514
-
success: (width:number, height:number) =>void,
515
-
failure?: (error:any) =>void,
516
-
): any;
507
+
headers: {[index: string]: string}
508
+
): Promise<{width: number, height: number}>;
517
509
```
518
510
519
511
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.
@@ -522,12 +514,10 @@ In order to retrieve the image dimensions, the image may first need to be loaded
522
514
523
515
**Parameters:**
524
516
525
-
| <divclassName="wideColumn">Name</div> | Type | Description |
| uri <divclass="label basic required">Required</div> | string | The location of the image. |
528
-
| headers <divclass="label basic required">Required</div> | object | The headers for the request. |
529
-
| 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. |
530
-
| failure | function | The function that will be called if there was an error, such as failing to retrieve the image. |
517
+
| <divclassName="wideColumn">Name</div> | Type | Description |
0 commit comments