react-progressive-image-loading
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -21,3 +21,3 @@ /// <reference types="react" /> | ||
}; | ||
constructor(props: ProgressiveImageProps); | ||
componentWillMount(): void; | ||
render(): JSX.Element; | ||
@@ -24,0 +24,0 @@ private fetch(src); |
@@ -14,15 +14,17 @@ "use strict"; | ||
var React = require("react"); | ||
var ProgressiveImage = (function (_super) { | ||
var ProgressiveImage = /** @class */ (function (_super) { | ||
__extends(ProgressiveImage, _super); | ||
function ProgressiveImage(props) { | ||
var _this = _super.call(this, props) || this; | ||
var _a = _this.props, src = _a.src, preview = _a.preview; | ||
var initialBlur = _this.props.initialBlur; | ||
_this.setState({ src: "", blur: initialBlur }); | ||
_this.fetch(preview) | ||
function ProgressiveImage() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
ProgressiveImage.prototype.componentWillMount = function () { | ||
var _this = this; | ||
var _a = this.props, src = _a.src, preview = _a.preview; | ||
var initialBlur = this.props.initialBlur; | ||
this.setState({ src: "", blur: initialBlur }); | ||
this.fetch(preview) | ||
.then(function (previewDataURI) { return _this.setState({ src: previewDataURI, blur: initialBlur }); }) | ||
.then(function () { return _this.fetch(src); }) | ||
.then(function (srcDataURI) { return _this.setState({ src: srcDataURI, blur: 0 }); }); | ||
return _this; | ||
} | ||
}; | ||
ProgressiveImage.prototype.render = function () { | ||
@@ -29,0 +31,0 @@ var src = this.state.src; |
{ | ||
"name": "react-progressive-image-loading", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"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
18734
83