mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Refactored the Image module. Added image.fromUrl method. Added image-tests.
This commit is contained in:
@@ -49,8 +49,10 @@ var createFolder = function (info: { path: string; name: string; }) {
|
||||
};
|
||||
|
||||
export class FileSystemEntity {
|
||||
|
||||
public getParent(): Folder {
|
||||
/**
|
||||
* Gets the Folder object representing the parent of this entity. Will be null for a root folder like Documents or Temporary.
|
||||
*/
|
||||
get parent(): Folder {
|
||||
var onError = function (error) {
|
||||
throw error;
|
||||
}
|
||||
@@ -93,7 +95,7 @@ export class FileSystemEntity {
|
||||
}
|
||||
}
|
||||
|
||||
var parentFolder = this.getParent();
|
||||
var parentFolder = this.parent;
|
||||
if (!parentFolder) {
|
||||
deferred.reject(new Error("No parent folder."));
|
||||
return deferred.promise();
|
||||
|
||||
Reference in New Issue
Block a user