mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
30 lines
877 B
TypeScript
30 lines
877 B
TypeScript
import { Plugin, Cordova } from './plugin';
|
|
/**
|
|
* @name Photo Viewer
|
|
* @description This plugin can display your image in full screen with the ability to pan, zoom, and share the image.
|
|
* @usage
|
|
* ```typescript
|
|
* import { PhotoViewer } from 'ionic-native';
|
|
*
|
|
* PhotoViewer.show('https://mysite.com/path/to/image.jpg');
|
|
*
|
|
* PhotoViewer.show('https://mysite.com/path/to/image.jpg', 'My image title', {share: false});
|
|
* ```
|
|
*/
|
|
@Plugin({
|
|
name: 'PhotoViewer',
|
|
plugin: 'com-sarriaroman-photoviewer',
|
|
pluginRef: 'PhotoViewer',
|
|
repo: 'https://github.com/sarriaroman/photoviewer'
|
|
})
|
|
export class PhotoViewer {
|
|
/**
|
|
* Shows an image in full screen
|
|
* @param url {string} URL or path to image
|
|
* @param title {string}
|
|
* @param options {any}
|
|
*/
|
|
@Cordova({sync: true})
|
|
static show(url: string, title?: string, options?: {share?: boolean; }): void { }
|
|
}
|