smartphoto
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -63,3 +63,3 @@ 'use strict'; | ||
allowVerticalGravity: false, | ||
useOrientationApi: true | ||
useOrientationApi: false | ||
}; | ||
@@ -129,6 +129,2 @@ | ||
if (!_this.data.isSmartPhone || !_this.data.useOrientationApi) { | ||
return _possibleConstructorReturn(_this); | ||
} | ||
(0, _zeptoBrowserify.$)(window).on("orientationchange", function (e) { | ||
@@ -142,4 +138,8 @@ _this._resetTranslate(); | ||
if (!_this.data.isSmartPhone || !_this.data.useOrientationApi) { | ||
return _possibleConstructorReturn(_this); | ||
} | ||
(0, _zeptoBrowserify.$)(window).on("deviceorientation", function (e) { | ||
if (!e.originalEvent) { | ||
if (!e.originalEvent || _this.data.appearEffect) { | ||
return; | ||
@@ -146,0 +146,0 @@ } |
{ | ||
"name": "smartphoto", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "smartphoto", | ||
@@ -17,6 +17,6 @@ "homepage": "http://developer.a-blogcms.jp", | ||
"watch:sass": "onchange \"scss\" -- npm run sass", | ||
"sync": "browser-sync start --server './' --files './js/*.js' './css/*.css' --startPath '/test/jquery.html'", | ||
"sync": "browser-sync start --server './' --files './js/*.js' './css/*.css' --startPath '/examples/jquery.html'", | ||
"start": "npm-run-all -p watch:js watch:sass sync" | ||
}, | ||
"author": "sappleple", | ||
"author": "appleple", | ||
"license": "MIT", | ||
@@ -23,0 +23,0 @@ "devDependencies": { |
@@ -11,3 +11,3 @@ # SmartPhoto | ||
- [npm](https://www.npmjs.com/package/smartphoto) | ||
- [standalone](https://raw.githubusercontent.com/appleple/smart-photo/master/js/smart-photo.js) | ||
- [standalone](https://raw.githubusercontent.com/appleple/smart-photo/master/js/smartphoto.js) | ||
@@ -28,8 +28,10 @@ via npm | ||
require | ||
```js | ||
const smartPhoto = require('smartphoto'); | ||
``` | ||
```js | ||
window.addEventListener('load',function(){ | ||
new smartPhoto(".js-img-viwer",{ | ||
arrows: false, | ||
}); | ||
new smartPhoto(".js-img-viwer"); | ||
}); | ||
@@ -36,0 +38,0 @@ ``` |
@@ -46,3 +46,3 @@ import aTemplate from 'a-template'; | ||
allowVerticalGravity:false, | ||
useOrientationApi:true | ||
useOrientationApi:false | ||
} | ||
@@ -109,6 +109,2 @@ | ||
if(!this.data.isSmartPhone || !this.data.useOrientationApi){ | ||
return; | ||
} | ||
$(window).on("orientationchange", (e) => { | ||
@@ -122,4 +118,8 @@ this._resetTranslate(); | ||
if(!this.data.isSmartPhone || !this.data.useOrientationApi){ | ||
return; | ||
} | ||
$(window).on("deviceorientation", (e) => { | ||
if(!e.originalEvent){ | ||
if(!e.originalEvent || this.data.appearEffect){ | ||
return; | ||
@@ -126,0 +126,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
7371125
128
4