Socket
Socket
Sign inDemoInstall

nativescript-photoviewer

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nativescript-photoviewer - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

9

index.ios.js

@@ -5,3 +5,3 @@ var imageSource = require("image-source");

PhotoViewer.prototype.showViewer = function(imagesArray) {
PhotoViewer.prototype.showViewer = function(imagesArray, startIndex) {
var currentViewController = frameModule.topmost().currentPage;

@@ -46,7 +46,8 @@ var photosArray = NSMutableArray.alloc().init();

var photosViewController = NYTPhotosViewController.alloc().initWithPhotos(photosArray);
var dataSource = NYTPhotoViewerArrayDataSource.dataSourceWithPhotos(photosArray);
startIndex = startIndex ? startIndex : 0;
var photosViewController = NYTPhotosViewController.alloc().initWithDataSourceInitialPhotoIndexDelegate(dataSource, startIndex, null);
this._ios = photosViewController;
//photosViewController.view.backgroundColor = UIColor.whiteColor();
currentViewController.ios.presentViewControllerAnimatedCompletion(photosViewController, true, null);
UIApplication.sharedApplication.keyWindow.rootViewController.presentViewControllerAnimatedCompletion(photosViewController, true, null);
};

@@ -53,0 +54,0 @@

{
"name": "nativescript-photoviewer",
"description": "A simple Photo-viewer component for NativeScript based on NYTPhotoViewer pod for iOS and ImageGalleryViewer for Android.",
"main": "index.js",
"version": "1.2.0",
"main": "index",
"version": "1.3.0",
"nativescript": {

@@ -7,0 +7,0 @@ "platforms": {

@@ -23,3 +23,3 @@ # NativeScript PhotoViewer

The usage is very simple. Require "nativescript-photoviewer" module and create a instance of it. Call the ```showViewer(array)``` function to present the photoViewer.
The ```showViewer()``` function accept a singe parameter, an array. The array can contain one, or a mixture, of the following types:
The ```showViewer(ARRAY, <INDEX>)``` function accepts a two parameters on iOS and one on Android. The first one is allways an Array. The Array can contain one, or a mixture, of the following types:
- String URLs that point to external images (iOS & Android)

@@ -32,2 +32,4 @@ - Custom defined objects that contain image-data (image/imageURL, title, summary, credit) (iOS only)

The second parameter is only for iOS, and is an optional `index` of the image, so that the gallery can focus on that image when loaded.
```js

@@ -69,3 +71,8 @@ // Require the module

```
## Changelog
** 1.3.0 **
- Updated iOS pod to newer version (fixed minor breaking changes)
- Added a second paramter to the `showViewer(ARRAY, INDEX?)` function. Makes the gallery init on that image: `photoViewer.showViewer(myImages, 2);`
## Screenshots

@@ -72,0 +79,0 @@ ![Demo PNG](ns-nytphoto-1.png) ![Demo PNG](ns-nytphoto-2.png)

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc