smartphoto
Advanced tools
Comparing version 0.2.3 to 0.2.4
@@ -383,5 +383,5 @@ 'use strict'; | ||
value: function hidePhoto() { | ||
this.zoomOutPhoto(); | ||
this.data.hide = true; | ||
this.data.appear = false; | ||
this.data.appearEffect = null; | ||
var scrollLocation = (0, _zeptoBrowserify.$)(window).scrollTop(); | ||
@@ -577,8 +577,8 @@ if (location.hash) { | ||
var tapSecond = date.getTime(); | ||
if (Math.abs(this.tapSecond - tapSecond) < 200) { | ||
if (Math.abs(this.tapSecond - tapSecond) <= 500) { | ||
this.e.preventDefault(); | ||
this.tapSecond = tapSecond; | ||
this.zoomPhoto(); | ||
return; | ||
} | ||
this.tapSecond = tapSecond; | ||
var swipeWidth = this.oldPos.x - this.firstPos.x; | ||
@@ -585,0 +585,0 @@ if (swipeWidth >= this.data.swipeOffset && this.data.currentIndex !== 0) { |
{ | ||
"name": "smartphoto", | ||
"version": "0.2.3", | ||
"version": "0.2.4", | ||
"description": "smartphoto", | ||
@@ -5,0 +5,0 @@ "homepage": "http://developer.a-blogcms.jp", |
# SmartPhoto | ||
[![npm version](https://badge.fury.io/js/smartphoto.svg)](https://badge.fury.io/js/smartphoto) | ||
The most easy to use responsive image viwer especially for mobile devices | ||
@@ -25,4 +27,2 @@ | ||
## Usage | ||
smartphoto.js | ||
require | ||
@@ -33,2 +33,3 @@ ```js | ||
smartphoto.js | ||
```js | ||
@@ -47,2 +48,23 @@ window.addEventListener('load',function(){ | ||
### Basic Standalone Usage | ||
```html | ||
<a href="./assets/large-kuma.jpg" class="js-img-viwer" data-caption="くま" data-id="kuma"> | ||
<img src="./assets/kuma.jpg" width="360" data-group="0"/> | ||
</a> | ||
<a href="./assets/large-rakuda.jpg" class="js-img-viwer" data-caption="ラクダ" data-id="rakuda"> | ||
<img src="./assets/rakuda.jpg" width="360" data-group="0"/> | ||
</a> | ||
<a href="./assets/large-sai.jpg" class="js-img-viwer" data-caption="サイ" data-id="sai"> | ||
<img src="./assets/sai.jpg" width="360" data-group="0"/> | ||
</a> | ||
<link rel="stylesheet" href="./css/smartphoto.min.css"> | ||
<script src="./js/smartphoto.js"></script> | ||
<script> | ||
window.addEventListener('load',function(){ | ||
new smartPhoto(".js-img-viwer"); | ||
}); | ||
</script> | ||
``` | ||
### Option | ||
@@ -130,3 +152,6 @@ | ||
## Contributor | ||
[@steelydylan](https://github.com/steelydylan) | ||
## License | ||
Code and documentation copyright 2017 by appleple, Inc. Code released under the [MIT License](https://github.com/appleple/SmartPhoto/blob/master/LICENSE). | ||
Code and documentation copyright 2017 by appleple, Inc. Code released under the [MIT License](https://github.com/appleple/SmartPhoto/blob/master/LICENSE). |
@@ -341,5 +341,5 @@ import aTemplate from 'a-template'; | ||
hidePhoto () { | ||
this.zoomOutPhoto(); | ||
this.data.hide = true; | ||
this.data.appear = false; | ||
this.data.appearEffect = null; | ||
const scrollLocation = $(window).scrollTop(); | ||
@@ -522,8 +522,8 @@ if (location.hash) { | ||
const tapSecond = date.getTime(); | ||
if(Math.abs(this.tapSecond - tapSecond) < 200) { | ||
if(Math.abs(this.tapSecond - tapSecond) <= 500) { | ||
this.e.preventDefault(); | ||
this.tapSecond = tapSecond; | ||
this.zoomPhoto(); | ||
return; | ||
} | ||
this.tapSecond = tapSecond; | ||
const swipeWidth = this.oldPos.x - this.firstPos.x | ||
@@ -530,0 +530,0 @@ if (swipeWidth >= this.data.swipeOffset && this.data.currentIndex !== 0 ) { |
@@ -27,2 +27,3 @@ "use strict" | ||
yield SystemPromise(`git push origin v${pkg.version}`); | ||
yield SystemPromise(`git push origin master`); | ||
yield SystemPromise(`npm publish`); | ||
@@ -29,0 +30,0 @@ } catch ( err ) { |
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
7372985
13041
154