Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ngx-pinch-zoom

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-pinch-zoom

Pinch zoom component for Angular2.

  • 1.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
increased by18.24%
Maintainers
1
Weekly downloads
 
Created
Source

Pinch zoom for Angular 2 (Angular 5+)

The module provides opportunities for image zooming in, zooming out and positioning with use of gestures on a touch screen.

Live demos and source code samples can be found on home page.

GIF demo

demo

Installation

Install the npm package.

npm i ngx-pinch-zoom

Import module:

import { PinchZoomModule } from 'ngx-pinch-zoom';

@NgModule({
    imports: [ PinchZoomModule ]
})

Usage

For use, put your image inside the <pinch-zoom> container. Please, pay attention to the parameters of your viewport metatag. If you use Pinch Zoom, it is required to limit zooming of a web-page, by entering the following parameters: <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">.

<pinch-zoom>
    <img src="path_to_image" /> 
</pinch-zoom>

Properties

nametypedefaultdescription
placementstringautoContainer height (in pixels or percentages).
transition-durationnumber200Defines the speed of the animation of positioning and transforming.
auto-zoom-outbooleanfalseAutomatic restoration of the original size of an image after its zooming in by two fingers.

Events

nametypedescription
touchstart{type: "touchstart"}The touchstart event is fired when one or more touch points are placed on the touch surface.
touchend{type: "touchend"}The touchend event is fired when one or more touch points are removed from the touch surface.
swipe{type: "swipe", moveX: number, moveY: number}Swipe event is opened, when a user shifts a zoomed image in any direction by a finger.
pinch{type: "pinch"}Pinch event is opened, when a user zooms an image in or out by two fingers.

Perhaps you will be interested in the expanded properties, methods and events of the commercial version.

Keywords

FAQs

Package last updated on 15 Jul 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc