yefeme 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/_sass/yefeme.scss +4 -0
- data/assets/blurhash.js +8 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fd985ddaddcd713620bd25f13590cf5a7dedb786b6206fea8bae2e11952997a8
|
|
4
|
+
data.tar.gz: 893b177b07d44e9815c657d588e8851a01d29a433b0b2c241ee13d7930d70d1e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70d95d0310ef51b4de48d76705f6dfd3f7646453ac27741f062eb837b6a861d972b6e30b78a0e442eb127194c72eb7a897ba7292e11a70da5fc07d9c58f50aeb
|
|
7
|
+
data.tar.gz: a553b2a0cb3a82a6123b7e26cc367d584c95ab542449babf759174b64b971f16959da9e762bc5e708857f38c127940a24c0247691b0f693b8ddf3b3a8aebb192
|
data/_sass/yefeme.scss
CHANGED
data/assets/blurhash.js
CHANGED
|
@@ -98,6 +98,14 @@
|
|
|
98
98
|
|
|
99
99
|
if (!hash || !intrinsicWidth || !intrinsicHeight) return;
|
|
100
100
|
|
|
101
|
+
function finishLoading() {
|
|
102
|
+
image.classList.add("blurhash-loaded");
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
image.addEventListener("load", finishLoading, { once: true });
|
|
106
|
+
image.addEventListener("error", finishLoading, { once: true });
|
|
107
|
+
if (image.complete) finishLoading();
|
|
108
|
+
|
|
101
109
|
var width = intrinsicWidth >= intrinsicHeight ? 32 : Math.max(1, Math.round(32 * intrinsicWidth / intrinsicHeight));
|
|
102
110
|
var height = intrinsicHeight >= intrinsicWidth ? 32 : Math.max(1, Math.round(32 * intrinsicHeight / intrinsicWidth));
|
|
103
111
|
var cacheKey = hash + ":" + width + "x" + height;
|