Code Monkey home page Code Monkey logo

ti.imageviewer's Introduction

Ti.ImageViewer

Image viewer widget for Appcelerator Titanium

With this image viewer it's possible to show a single - zoomable, scrollable and pinchable - local image on iOS and Android (on iOS also remote images).

It uses module org.iotashan.TiTouchImageView (on Android), and installation of this module is necessary if you mean to use the widget on Android.

image

Installation

Add in your config.json, under dependencies:

"dependencies": {
    "it.apra.tiimageviewer": "*"
}

Usage

widget = Alloy.createWidget('it.apra.tiimageviewer', {
	'image' : filepath,
	'title' : filename,
	'subtitle' : des
});

Usage with Alloy

		<Widget src="it.apra.tiimageviewer" id="myiview" image="..." lowerGradientHidden="true" lowerInfoHidden="true"/>

Args

  • image: image filepath
  • title: optional image title (showed in lower panel)
  • subtitle: optional image subtitle (showed in lower panel)
  • lowerInfoHidden: if true hides lower info panel
  • lowerGradientHidden: if true hides lower info panel gradient
  • backgroundColor: backgroundColor (default is 'black')

Functions

  • removeEventListeners: removes all listeners on controls
  • reloadImage: reloads the image
  • showLowerInfo: showes lower info
  • hideLowerInfo: hides lower info

##Notes

ti.imageviewer's People

Contributors

nonno avatar christoferw avatar topener avatar ndastur avatar

Stargazers

 avatar Waqas Mahmood Khan avatar Steven avatar Usame Cavga avatar Manjunath (MJ) avatar Dirlei Dionísio avatar Darius G avatar Ianko Leite avatar Nazır Doğan avatar Jason David Miller avatar Dongwoo Gim avatar 衣不如新 avatar Marcel Pociot avatar Joseph avatar Flavio Maria De Stefano avatar Michael Gangolf avatar Conny Brunnkvist avatar  avatar Konstantin Büschel avatar Michael Pauley avatar Dan Tamas avatar BeauR avatar  avatar samuele coppede avatar Ivan Carlos avatar Vinicius Oliveira avatar Thibault Lenclos avatar Clem Blanco avatar Vincent Desdoigts avatar Abdulatif Henno avatar

Watchers

James Cloos avatar Luca Cardinali avatar

ti.imageviewer's Issues

No support for remote images on Android

I got the error remote images are not supported. Converting to blob and adding it after that works though...

Your example uses remote images, so not sure if it is a bug on my end or it really doesn't support it

Screenshots

It sounds great, but a screenshot in the readme would be even better ;)

IMGS is undefined with remote images on iOS

When downloading (bigger) images remotely, it triggers this error when I try to resize it. Clicking the image (to reset scaling) fixes it.

Doesn't happen when image is already cached and loaded

Only happens with remote images on iOS (as Android doesn't support remote images, I cannot test it)

[ERROR] :  Script Error {
[ERROR] :      column = 24;
[ERROR] :      line = 154;
[ERROR] :      message = "undefined is not an object (evaluating 'IMGS.width')";
[ERROR] :      sourceURL = "file:///Users/renepot/Library/Developer/CoreSimulator/Devices/C02E83ED-17DA-4244-923C-C90923CBBA09/data/Containers/Bundle/Application/DA8A3624-6ACF-44E1-BF15-2D895D04AA79/Roamler.app/alloy/widgets/it.apra.tiimageviewer/controllers/widget.js";
[ERROR] :      stack = "getMaxOffset@file:///Users/renepot/Library/Developer/CoreSimulator/Devices/C02E83ED-17DA-4244-923C-C90923CBBA09/data/Containers/Bundle/Application/DA8A3624-6ACF-44E1-BF15-2D895D04AA79/Roamler.app/alloy/widgets/it.apra.tiimageviewer/controllers/widget.js:154:24\nfile:///Users/renepot/Library/Developer/CoreSimulator/Devices/C02E83ED-17DA-4244-923C-C90923CBBA09/data/Containers/Bundle/Application/DA8A3624-6ACF-44E1-BF15-2D895D04AA79/Roamler.app/alloy/widgets/it.apra.tiimageviewer/controllers/widget.js:219:86";
[ERROR] :  }```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.