npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ts.photographer

v1.0.0

Published

Take pictures and manage them in a Titanium app.

Downloads

22

Readme

Photographer Titanium Alloy License

This widget for the Appcelerator Titanium Alloy MVC framework provides a full autonomous photo manager. It gives the user a way to take picture and browse previously taken pictures through thumbnails. A user may also discard a picture and take new one.

Preview

iOS

preview

Android

preview

Quick Start

Get it gitTio npm

Download this repository and install it:

  • In your application's config.json file, include the following line in your dependencies:
"dependencies": {
    "ts.photographer": "1.0"
}
  • Copy the ts.photographer folder into your app/widgets directory.
  • Be sure to check and install all dependencies.

Or use your favorite package manager

  • gitTio: gittio install ts.photographer

  • npm: npm install ts.photographer

Use it

  • Require the widget in a view:

file1.xml

<Widget id="photographer" src="ts.photographer" />`

Which create a reference in your controller, accessible via: $.photographer

  • Or, require it directly in a controller :
var blurryView = Alloy.createWidget("ts.photographer");

Do not forget to initialize the widget; Before opening your window, call the widget's init method. For instance:

$.photographer.init({
    previewBackgroundColor: "#1DB7FF",
    addBackgroundColor: "#1DB7FF",
    resolution: 1.5,

    fadeDuration: $.photographer.SLOW,
    fadeIntensity: $.photographer.NORMAL,
    rotateIntensity: $.photographer.HIGH,

    
    animations: {
        $.photographer.DISCARD_SWIPE_HORIZONTAL,
        $.photographer.DISCARD_ROTATE,
        $.photographer.DISCARD_FADEOUT,
        $.photographer.ADD_SMOOTH,
        $.photographer.CHANGE_FADEOUT
    }

});

Here is the list of available methods and options:

retrievePictures : <Image[]>

Retrieve all pictures taken by the user as an array of Image.

init (options <Object>)

Initialize the widget.

  • noPreviewBackgroundColor <String>: The background color to display on initialisation.
  • noPreviewIcon <String | Image>: The icon to display on initialisation.
  • previewHeight <Number>: The height of the preview image. The preview will be full-width.
  • thumbnailSize <Number>: The size (height and width) of each thumbnail; This is also the size of the add button.
  • thumbnailSelectedBorderColor <String>: The border color of a selected thumbnail.
  • thumbnailBarBackgroundColor <String>: The background color of the thumbnail bar. Do not use transparent.
  • addIcon <String | Image>: The add icon.
  • addBackgroundColor <String>: The add button background color.
  • delimiterColor <String>: Color of the delimiter below the preview.
  • discardBackgroundColor <String>: The color use behind the preview when the user perform a discard gesture.
  • discardIcon <String | Image>: The discard icon shown when discarding.
  • undoIcon <String | Image>: The undo icon shown after a discard.
  • discardConfirmTitle <String>: Title of the alert shown when discarding.
  • discardConfirmMessage <String>: Content of the alert shown when discarding.
  • discardConfirmButtonDiscard <String>: Value of the alert button corresponding to the 'discard' action.
  • discardConfirmButtonCancel <String>: Value of the alert button corresponding to the 'cancel' action.
  • maxResolution <Number>: Max resolution of the picture taken, in megapixel.
  • fadeDuration <SLOW | NORMAL | QUICK>: Duration in milliseconds of the fade when changing a picture.
  • scaleIntensity <LOW | NORMAL | HIGH>: Intensity of the scaling down effect on discard gesture.
  • rotateIntensity <LOW | NORMAL | HIGH>: Intensity of the rotation effect on discard gesture.
  • fadeIntensity <LOW | NORMAL | HIGH>: Intensity of the fade effect on discard gesture.
  • shiftDuration <SLOW | NORMAL | QUICK>: Duration of the smooth shift effect on Android.
  • animations <Array>: All animation to perform :
    • DISCARD_SWIPE_HORIZONTAL: Allow the user to translate horizontally the picture on swipe.
    • DISCARD_SWIPE_VERTICAL: Allow the user to translate vertically the picture on swipe.
    • DISCARD_ROTATE: Rotate the picture during the swipe.
    • DISCARD_SCALEDOWN: Scale-down the picture during the swipe.
    • DISCARD_FADEOUT: Fadeout the picture during the swipe.
    • ADD_SMOOTH: Android only, resize smoothly the thumbnail bar when a picture is added / removed.
    • CHANGE_FADEOUT: Fadeout the preview when changing to another.

Changelog

  • 1.0 First version

TODO

  • Tests coming soon.
  • Enhance documentation.

wearesmiths

Appcelerator, Appcelerator Titanium and associated marks and logos are trademarks of Appcelerator, Inc.
Titanium is Copyright (c) 2008-2015 by Appcelerator, Inc. All Rights Reserved.
Titanium is licensed under the Apache Public License (Version 2).