From c75f89894ae245cc239e0f6e36cb52869ec847bf Mon Sep 17 00:00:00 2001 From: Ibrahim Hadeed Date: Tue, 6 Sep 2016 23:04:53 -0400 Subject: [PATCH] fix(): remove CanvasCamera plugin --- src/index.ts | 3 -- src/plugins/canvas-camera.ts | 94 ------------------------------------ 2 files changed, 97 deletions(-) delete mode 100644 src/plugins/canvas-camera.ts diff --git a/src/index.ts b/src/index.ts index b04a140db8..055e91bed6 100644 --- a/src/index.ts +++ b/src/index.ts @@ -21,7 +21,6 @@ import { BLE } from './plugins/ble'; import { BluetoothSerial } from './plugins/bluetoothserial'; import { Calendar } from './plugins/calendar'; import { CallNumber } from './plugins/call-number'; -import { CanvasCamera } from './plugins/canvas-camera'; import { Camera } from './plugins/camera'; import { CameraPreview } from './plugins/camera-preview'; import { CardIO } from './plugins/card-io'; @@ -162,7 +161,6 @@ Brightness, BLE, BluetoothSerial, CallNumber, -CanvasCamera, CameraPreview, Clipboard, CodePush, @@ -235,7 +233,6 @@ window['IonicNative'] = { BluetoothSerial, Calendar, CallNumber, - CanvasCamera, Camera, CameraPreview, CardIO, diff --git a/src/plugins/canvas-camera.ts b/src/plugins/canvas-camera.ts deleted file mode 100644 index 972a1195d0..0000000000 --- a/src/plugins/canvas-camera.ts +++ /dev/null @@ -1,94 +0,0 @@ -import { Plugin, Cordova } from './plugin'; -/** - * @name CanvasCamera - * @description - * - * @usage - * ``` - * import {CanvasCamera} from 'ionic-native'; - * - * let object = document.getElementById('myDiv'); - * // or - * @ViewChild('myDiv') object; - * - * CanvasCamera.initialize(object); - * - * CanvasCamera.start(); - * - * CanvasCamera.takePicture().then(picture => { }); - * - * ``` - */ -@Plugin({ - plugin: 'com.keith.cordova.plugin.canvascamera', - pluginRef: 'CanvasCamera', - repo: 'https://github.com/donaldp24/CanvasCameraPlugin' -}) -export class CanvasCamera { - static DestinationType = { - DATA_URL: 0, - FILE_URI: 1 - }; - static PictureSourceType = { - PHOTOLIBRARY : 0, - CAMERA : 1, - SAVEDPHOTOALBUM : 2 - }; - static EncodingType = { - JPEG : 0, - PNG : 1 - }; - static CameraPosition = { - BACK : 0, - FRONT : 1 - }; - static FlashMode = { - OFF : 0, - ON : 1, - AUTO : 2 - }; - /** - * Initialize the Camera - * @param htmlElement {HTMLElement} The HTML Element to preview the camera in - */ - @Cordova({sync: true}) - static initialize(htmlElement: HTMLElement): void { } - - /** - * Start capture video as images from camera to preview camera on web page. - * @param options - */ - @Cordova({sync: true}) - static start(options?: { - quality?: number; - sourceType?: number; - destinationType?: number; - allowEdit?: boolean; - correctOrientation?: boolean; - saveToPhotoAlbum?: boolean; - encodingType?: number; - width?: number; - height?: number; - }): void { } - - /** - * Takes a photo - * @returns {Promise} - */ - @Cordova() - static takePicture(): Promise { return; } - - /** - * Sets the flash mode - * @param flashMode {number} Flash mode, use CanvasCamera.FlashMode constant to set - */ - @Cordova({sync: true}) - static setFlashMode(flashMode: number): void { } - - /** - * Set camera position - * @param cameraPosition {number} Camera Position, use CanvasCamera.CameraPosition constant - */ - @Cordova({sync: true}) - static setCameraPosition(cameraPosition: number): void {} -}