🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

react-component-image-gallery

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-component-image-gallery - npm Package Compare versions

Comparing version
1.0.6
to
1.1.0
+2
-2
API.md

@@ -10,3 +10,3 @@ <!-- Generated by documentation.js. Update this documentation by updating the source code. -->

[src/components/Gallery.js:45-93](https://github.com/m860/react-component-image-gallery/blob/21c94d4783df7a51fcc6dc2c67fff8d9c2e81cec/src/components/Gallery.js#L45-L93 "Source code on GitHub")
[src/components/Gallery.js:45-94](https://github.com/m860/react-component-image-gallery/blob/a162d7bdd1a928e35269ce7de4352962f515836a/src/components/Gallery.js#L45-L94 "Source code on GitHub")

@@ -60,3 +60,3 @@ **Extends PureComponent**

[src/components/Gallery.js:53-62](https://github.com/m860/react-component-image-gallery/blob/21c94d4783df7a51fcc6dc2c67fff8d9c2e81cec/src/components/Gallery.js#L53-L62 "Source code on GitHub")
[src/components/Gallery.js:53-63](https://github.com/m860/react-component-image-gallery/blob/a162d7bdd1a928e35269ce7de4352962f515836a/src/components/Gallery.js#L53-L63 "Source code on GitHub")

@@ -63,0 +63,0 @@ [...react-image-gallery.props ](https://github.com/xiaolin/react-image-gallery#props)

@@ -126,3 +126,4 @@ "use strict";

style: _propTypes2.default.object,
className: _propTypes2.default.string
className: _propTypes2.default.string,
scaleRate: _propTypes2.default.number
})

@@ -129,0 +130,0 @@ };

@@ -163,6 +163,6 @@ "use strict";

var diff = dis1 - dis2;
var scale = diff / 1000;
var scale = diff / this.props.scaleRate;
var targetScale = this.state.scale + scale;
var state = Object.assign({}, this.state, {
scale: this.state.scale + scale
scale: targetScale > 0.1 ? targetScale : 0.1
});

@@ -351,3 +351,4 @@ this.setState(state);

style: _propTypes2.default.object,
className: _propTypes2.default.string
className: _propTypes2.default.string,
scaleRate: _propTypes2.default.number
};

@@ -358,4 +359,5 @@ GalleryItem.defaultProps = {

style: {},
className: ''
className: '',
scaleRate: 100
};
exports.default = GalleryItem;
{
"name": "react-component-image-gallery",
"version": "1.0.6",
"version": "1.1.0",
"description": "",

@@ -57,9 +57,9 @@ "main": "index.js",

},
"peerDependencies": {
"prop-types": ">=15.5.10",
"react": ">=15.6.1",
"react-dom": ">=15.6.1",
"react-motion": ">=0.5.0",
"react-image-gallery": ">=0.8.3"
"dependencies": {
"prop-types": "^15.5.10",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-motion": "^0.5.0",
"react-image-gallery": "^0.8.3"
}
}

@@ -30,2 +30,7 @@ # react-component-image-gallery

import Gallery from 'react-component-image-gallery'
```
```
## Change Logs
### v1.1.0
- 添加了缩放速度的控制