-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(photo-viewer): add wrapper for plugin (#359)
* feat(photo-viewer): add wrapper for plugin * tslint
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
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({ | ||
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}) | ||
show(url: string, title?: string, options?: {share?: boolean; }): void { } | ||
} |