🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@raincatcher/step-gallery

Package Overview
Dependencies
Maintainers
6
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@raincatcher/step-gallery

Gallery Step for RainCatcher

latest
npmnpm
Version
1.1.2
Version published
Maintainers
6
Created
Source

This step exemplifies the utilization of the @raincatcher/camera and @raincatcher/filestorage-client modules in a custom step that can take multiple pictures as part of its execution flow.

Specifiying camera options

In order to supply options for the underlying cordova camera plugin, supply a function that edits the default options and returns the updated version of the intended configuration:

var galleryStep = require('@raincatcher/step-gallery');
// add thestep as a dependency of the mobile app
angular.module('wfm-mobile', [
  //...
  galleryStep.ngModule($fh, function buildOptions(camera) {
    return  {
      'quality': 20,
      // camera is the cordova plugin Camera object
      'destinationType': camera.DestinationType.FILE_URI,
      'sourceType': camera.PictureSourceType.CAMERA,
      'encodingType': camera.EncodingType.JPEG,
      'mediaType': camera.MediaType.PICTURE,
      'allowEdit': false,
      'correctOrientation': true
    };
  }, "user");
]);

The returned options are merged with the default ones in @raincatcher/camera, and the above values display the defaults.

Keywords

raincatcher-step

FAQs

Package last updated on 18 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts