refactor(photo-viewer): improve options documentation (#2014)

This commit is contained in:
Quentin Ligier 2017-10-06 05:23:09 +02:00 committed by Ibby Hadeed
parent ddb6d43ffa
commit e65406cc2f

View File

@ -1,5 +1,13 @@
import { Injectable } from '@angular/core'; import { Injectable } from '@angular/core';
import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core'; import { Plugin, Cordova, IonicNativePlugin } from '@ionic-native/core';
export interface PhotoViewerOptions {
/**
* Set to false to disable the share button (Android only). Default: true
*/
share?: boolean;
}
/** /**
* @name Photo Viewer * @name Photo Viewer
* @description This plugin can display your image in full screen with the ability to pan, zoom, and share the image. * @description This plugin can display your image in full screen with the ability to pan, zoom, and share the image.
@ -29,8 +37,8 @@ export class PhotoViewer extends IonicNativePlugin {
* Shows an image in full screen * Shows an image in full screen
* @param url {string} URL or path to image * @param url {string} URL or path to image
* @param title {string} * @param title {string}
* @param options {any} * @param options {PhotoViewerOptions}
*/ */
@Cordova({sync: true}) @Cordova({sync: true})
show(url: string, title?: string, options?: {share?: boolean}): void { } show(url: string, title?: string, options?: PhotoViewerOptions): void { }
} }