mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 05:18:39 +08:00
refactor: circular deps part 14
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { ImageSource as ImageSourceDefinition, iosSymbolScaleType } from '.';
|
||||
import { ImageAsset } from '../image-asset';
|
||||
import * as http from '../http';
|
||||
import { getImageRequest } from '../http/http-shared';
|
||||
import { path as fsPath, knownFolders } from '../file-system';
|
||||
import { isFileOrResourcePath, RESOURCE_PREFIX, layout } from '../utils';
|
||||
import { getNativeApp } from '../application/helpers-common';
|
||||
@ -63,7 +63,7 @@ export class ImageSource implements ImageSourceDefinition {
|
||||
}
|
||||
|
||||
static fromUrl(url: string): Promise<ImageSource> {
|
||||
return http.getImage(url) as Promise<ImageSource>;
|
||||
return getImageRequest(url) as Promise<ImageSource>;
|
||||
}
|
||||
|
||||
static fromResourceSync(name: string): ImageSource {
|
||||
|
@ -1,17 +1,13 @@
|
||||
// Definitions.
|
||||
import { ImageSource as ImageSourceDefinition, iosSymbolScaleType } from '.';
|
||||
import { ImageAsset } from '../image-asset';
|
||||
import type { ImageBase } from '../ui/image/image-common';
|
||||
import { Font } from '../ui/styling/font';
|
||||
import { Color } from '../color';
|
||||
import { Trace } from '../trace';
|
||||
|
||||
// Types.
|
||||
import { path as fsPath, knownFolders } from '../file-system';
|
||||
import { isFileOrResourcePath, RESOURCE_PREFIX, layout, releaseNativeObject, SYSTEM_PREFIX } from '../utils';
|
||||
|
||||
import { getScaledDimensions } from './image-source-common';
|
||||
import * as http from '../http';
|
||||
import { getImageRequest } from '../http/http-shared';
|
||||
|
||||
export { isFileOrResourcePath };
|
||||
|
||||
@ -62,7 +58,7 @@ export class ImageSource implements ImageSourceDefinition {
|
||||
}
|
||||
|
||||
static fromUrl(url: string): Promise<ImageSource> {
|
||||
return http.getImage(url) as Promise<ImageSource>;
|
||||
return getImageRequest(url) as Promise<ImageSource>;
|
||||
}
|
||||
|
||||
static iosSystemScaleFor(scale: iosSymbolScaleType) {
|
||||
|
Reference in New Issue
Block a user