ngx-pinch-zoom
Advanced tools
Comparing version 1.0.7 to 1.1.0
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export * from './index'; | ||
export * from './public_api'; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":4,"metadata":{"PinchZoomComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"pinch-zoom, [pinch-zoom]","template":"<div #content> <ng-content></ng-content> </div>"}]}],"members":{"containerHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":32,"character":5},"arguments":["height"]}]}],"hostDisplay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":34,"character":5},"arguments":["style.display"]}]}],"hostOverflow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":35,"character":5},"arguments":["style.overflow"]}]}],"hostHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":36,"character":5},"arguments":["style.height"]}]}],"contentEl":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":38,"character":5},"arguments":["content"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":40,"character":36}]}],"ngOnInit":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":51,"character":5},"arguments":["window:resize",["$event"]]}]}],"touchstartHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":56,"character":5},"arguments":["touchstart",["$event"]]}]}],"touchmoveHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":61,"character":5},"arguments":["touchmove",["$event"]]}]}],"touchendHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":104,"character":5},"arguments":["touchend",["$event"]]}]}],"getDistance":[{"__symbolic":"method"}],"getImageHeight":[{"__symbolic":"method"}],"getImageWidth":[{"__symbolic":"method"}],"setBasicStyles":[{"__symbolic":"method"}],"setImageWidth":[{"__symbolic":"method"}],"transformElem":[{"__symbolic":"method"}]}}},"origins":{"PinchZoomComponent":"./pinch-zoom.component"},"importAs":"ngx-pinch-zoom"} | ||
{"__symbolic":"module","version":4,"metadata":{"PinchZoomComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":2,"character":1},"arguments":[{"selector":"pinch-zoom, [pinch-zoom]","template":"<div #content>\n\t<ng-content></ng-content>\n</div>","styles":[":host{position:relative}"]}]}],"members":{"containerHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":40,"character":5},"arguments":["height"]}]}],"transitionDuration":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":41,"character":5},"arguments":["transition-duration"]}]}],"autoZoomOut":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":42,"character":5},"arguments":["auto-zoom-out"]}]}],"id":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Input","line":43,"character":5},"arguments":["id"]}]}],"events":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Output","line":50,"character":5}}]}],"hostDisplay":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":52,"character":5},"arguments":["style.display"]}]}],"hostOverflow":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":53,"character":5},"arguments":["style.overflow"]}]}],"hostHeight":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostBinding","line":54,"character":5},"arguments":["style.height"]}]}],"contentElement":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":56,"character":5},"arguments":["content"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ElementRef","line":76,"character":36}]}],"ngOnInit":[{"__symbolic":"method"}],"onResize":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":90,"character":5},"arguments":["window:resize",["$event"]]}]}],"touchstartHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":96,"character":5},"arguments":["touchstart",["$event"]]}]}],"touchmoveHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":110,"character":5},"arguments":["touchmove",["$event"]]}]}],"touchendHandler":[{"__symbolic":"method","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"HostListener","line":125,"character":5},"arguments":["touchend",["$event"]]}]}],"handleSwipe":[{"__symbolic":"method"}],"handlePinch":[{"__symbolic":"method"}],"detectSwipe":[{"__symbolic":"method"}],"getDistance":[{"__symbolic":"method"}],"getImageHeight":[{"__symbolic":"method"}],"getImageWidth":[{"__symbolic":"method"}],"setBasicStyles":[{"__symbolic":"method"}],"setImageWidth":[{"__symbolic":"method"}],"transformElement":[{"__symbolic":"method"}],"resetScale":[{"__symbolic":"method"}],"updateInitialValues":[{"__symbolic":"method"}],"centeringImage":[{"__symbolic":"method"}],"alignImage":[{"__symbolic":"method"}],"transitionYRestriction":[{"__symbolic":"method"}],"transitionXRestriction":[{"__symbolic":"method"}],"getElementPosition":[{"__symbolic":"method"}]}},"PinchZoomModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":4,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"PinchZoomComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":9,"character":8}],"exports":[{"__symbolic":"reference","name":"PinchZoomComponent"}],"entryComponents":[{"__symbolic":"reference","name":"PinchZoomComponent"}]}]}],"members":{}}},"origins":{"PinchZoomComponent":"./lib/pinch-zoom.component","PinchZoomModule":"./lib/pinch-zoom.module"},"importAs":"ngx-pinch-zoom"} |
{ | ||
"name": "ngx-pinch-zoom", | ||
"version": "1.0.7", | ||
"version": "1.1.0", | ||
"description": "Pinch zoom component for Angular2.", | ||
@@ -26,11 +26,19 @@ "repository": { | ||
}, | ||
"main": "ngx-pinch-zoom.umd.js", | ||
"module": "ngx-pinch-zoom.js", | ||
"jsnext:main": "ngx-pinch-zoom.js", | ||
"peerDependencies": { | ||
"@angular/common": "^6.0.0-rc.0 || ^6.0.0", | ||
"@angular/core": "^6.0.0-rc.0 || ^6.0.0" | ||
}, | ||
"main": "bundles/ngx-pinch-zoom.umd.js", | ||
"module": "fesm5/ngx-pinch-zoom.js", | ||
"es2015": "fesm2015/ngx-pinch-zoom.js", | ||
"esm5": "esm5/ngx-pinch-zoom.js", | ||
"esm2015": "esm2015/ngx-pinch-zoom.js", | ||
"fesm5": "fesm5/ngx-pinch-zoom.js", | ||
"fesm2015": "fesm2015/ngx-pinch-zoom.js", | ||
"typings": "ngx-pinch-zoom.d.ts", | ||
"peerDependencies": { | ||
"@angular/core": "^4.0.0", | ||
"rxjs": "^5.1.0", | ||
"zone.js": "^0.8.4" | ||
"metadata": "ngx-pinch-zoom.metadata.json", | ||
"sideEffects": false, | ||
"dependencies": { | ||
"tslib": "^1.9.0" | ||
} | ||
} |
@@ -1,9 +0,7 @@ | ||
# Pinch zoom for Angular 2 | ||
# Pinch zoom for Angular 2 (Angular 5+) | ||
## Live demo | ||
The module provides opportunities for image zooming in, zooming out and positioning with use of gestures on a touch screen. | ||
See [live example](http://crystalui.org/components/pinch-zoom/live) (use mobile device). | ||
Live demos and source code samples can be found on [home page](http://crystalui.org/components/pinch-zoom). | ||
![alt text](http://crystalui.org/assets/img/qr--pinch-zoom.png) | ||
## GIF demo | ||
@@ -24,6 +22,6 @@ | ||
```ts | ||
import { PinchZoomComponent } from 'ngx-pinch-zoom/components'; | ||
import { PinchZoomModule } from 'ngx-pinch-zoom'; | ||
@NgModule({ | ||
declarations: [ PinchZoomComponent ] | ||
imports: [ PinchZoomModule ] | ||
}) | ||
@@ -33,4 +31,6 @@ ``` | ||
## 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">. | ||
```html | ||
<pinch-zoom height="100%"> | ||
<pinch-zoom> | ||
<img src="path_to_image" /> | ||
@@ -42,4 +42,17 @@ </pinch-zoom> | ||
| name | type | description | | ||
|------------------|-------------------------------------|---------------------------------------------------------------------------| | ||
| height | string | Container height (in pixels or percentages). | | ||
| name | type | default | description | | ||
|------------------|-----------------|---------|---------------------------------------------| | ||
| placement | string | auto | Container height (in pixels or percentages).| | ||
| transition-duration | number | 200 | Defines the speed of the animation of positioning and transforming.| | ||
| auto-zoom-out | boolean | false | Automatic restoration of the original size of an image after its zooming in by two fingers.| | ||
## Events | ||
| name | type | description | | ||
|------------------|---------------------------|---------------------------------------------| | ||
| 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](http://crystalui.org/components/pinch-zoom). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
371740
23
2512
55
2
1
+ Addedtslib@^1.9.0
+ Added@angular/common@6.1.10(transitive)
+ Added@angular/core@6.1.10(transitive)
+ Addedrxjs@6.6.7(transitive)
- Removed@angular/core@4.4.7(transitive)
- Removedrxjs@5.5.12(transitive)
- Removedsymbol-observable@1.0.1(transitive)