nativescript-imagepicker
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -173,8 +173,12 @@ "use strict"; | ||
if (options) { | ||
var targetSize = options.maxWidth < options.maxHeight ? options.maxWidth : options.maxHeight; | ||
while (!(this.matchesSize(targetSize, outWidth) || | ||
this.matchesSize(targetSize, outHeight))) { | ||
outWidth /= 2; | ||
outHeight /= 2; | ||
scale *= 2; | ||
var targetSize = !options.maxWidth && options.maxHeight ? options.maxHeight : | ||
(!options.maxHeight && options.maxWidth ? options.maxWidth : | ||
(options.maxWidth < options.maxHeight ? options.maxWidth : options.maxHeight)); | ||
if (targetSize) { | ||
while (!(this.matchesSize(targetSize, outWidth) || | ||
this.matchesSize(targetSize, outHeight))) { | ||
outWidth /= 2; | ||
outHeight /= 2; | ||
scale *= 2; | ||
} | ||
} | ||
@@ -181,0 +185,0 @@ } |
@@ -1,4 +0,4 @@ | ||
import observable = require("tns-core-modules/data/observable"); | ||
import imagesource = require("tns-core-modules/image-source"); | ||
import imageAssetModule = require("tns-core-modules/image-asset"); | ||
import { Observable } from "tns-core-modules/data/observable"; | ||
import { ImageSource } from "tns-core-modules/image-source"; | ||
import { ImageAsset } from "tns-core-modules/image-asset"; | ||
@@ -22,3 +22,9 @@ export interface ImageOptions { | ||
export class SelectedAsset extends imageAssetModule.ImageAsset { | ||
export class SelectedAsset extends ImageAsset { | ||
/** | ||
* A 100x100 pixels thumb of the selected image. | ||
* This property will be initialized on demand. The first access will return undefined or null. | ||
* It will trigger an async load and when the thumb is obtained, a property changed notification will occur. | ||
*/ | ||
thumb: ImageSource; | ||
@@ -43,3 +49,3 @@ /** | ||
*/ | ||
getImage(options?: ImageOptions): Promise<imagesource.ImageSource>; | ||
getImage(options?: ImageOptions): Promise<ImageSource>; | ||
@@ -97,2 +103,9 @@ /** | ||
android?: { | ||
/** | ||
* Provide a reason for permission request to access external storage on api levels above 23. | ||
*/ | ||
read_external_storage?: string; | ||
}; | ||
/** | ||
@@ -99,0 +112,0 @@ * Indicates images should be sorted newest-first (iOS only, default false). |
{ | ||
"name": "nativescript-imagepicker", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "A plugin for the NativeScript framework implementing multiple image picker", | ||
@@ -5,0 +5,0 @@ "repository": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53108
1025
0