react-progressive-image-loading
Advanced tools
Comparing version 1.0.10 to 1.1.0
@@ -12,2 +12,3 @@ /// <reference types="react" /> | ||
timingFunction?: string; | ||
maxBlur?: number; | ||
} | ||
@@ -23,2 +24,3 @@ export interface ProgressiveImageState { | ||
timingFunction: string; | ||
maxBlur: number; | ||
}; | ||
@@ -25,0 +27,0 @@ componentWillMount(): void; |
@@ -31,7 +31,7 @@ "use strict"; | ||
var _this = this; | ||
var _a = this.props, src = _a.src, preview = _a.preview; | ||
this.setState({ src: "", blur: 10 }); | ||
var _a = this.props, src = _a.src, preview = _a.preview, maxBlur = _a.maxBlur; | ||
this.setState({ src: "", blur: maxBlur }); | ||
this.cloneProps(); | ||
this.fetch(preview) | ||
.then(function (previewDataURI) { return _this.setState({ src: previewDataURI, blur: 10 }); }) | ||
.then(function (previewDataURI) { return _this.setState({ src: previewDataURI, blur: maxBlur }); }) | ||
.then(function () { return _this.fetch(src); }) | ||
@@ -57,3 +57,3 @@ .then(function (srcDataURI) { return _this.setState({ src: srcDataURI, blur: 0 }); }); | ||
Object.keys(this.props) | ||
.filter(function (prop) { return ["style", "src", "preview", "background", "transitionTime", "timingFunction", "backgroundImages", "children"].indexOf(prop) === -1; }) | ||
.filter(function (prop) { return ["style", "src", "preview", "background", "transitionTime", "timingFunction", "backgroundImages", "maxBlur", "children"].indexOf(prop) === -1; }) | ||
.forEach(function (prop) { return _this.clonedProps[prop] = _this.props[prop]; }); | ||
@@ -81,5 +81,6 @@ }; | ||
transitionTime: 500, | ||
timingFunction: "ease" | ||
timingFunction: "ease", | ||
maxBlur: 10 | ||
}; | ||
exports.ProgressiveImage = ProgressiveImage; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-progressive-image-loading", | ||
"version": "1.0.10", | ||
"version": "1.1.0", | ||
"description": "Progressively load images using a blur effect. Edit", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
Sorry, the diff of this file is not supported yet
21244
113