@builder.io/sdk 1.1.29-1 → 1.1.29-3
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.
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs.js +9 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +9 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +9 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/package.json +1 -1
- package/dist/src/classes/animator.class.d.ts +1 -1
- package/dist/src/classes/animator.class.js +8 -5
- package/dist/src/classes/animator.class.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
throw new Error("Property name \"".concat(name, "\" is not allowed"));
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
var version = "1.1.29-
|
|
155
|
+
var version = "1.1.29-2";
|
|
156
156
|
|
|
157
157
|
var Subscription = /** @class */ (function () {
|
|
158
158
|
function Subscription(listeners, listener) {
|
|
@@ -701,14 +701,17 @@
|
|
|
701
701
|
}
|
|
702
702
|
setTimeout(function () {
|
|
703
703
|
pendingAnimation = false;
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
704
|
+
if (!animation.repeat) {
|
|
705
|
+
element.style.transition = '';
|
|
706
|
+
element.style.transitionDelay = '';
|
|
707
|
+
}
|
|
708
|
+
}, (animation.duration + (animation.delay || 0)) * 1000 + 100);
|
|
707
709
|
});
|
|
708
710
|
}
|
|
709
711
|
else if (animation.repeat && triggered && !pendingAnimation && !isScrolledIntoView(element)) {
|
|
710
712
|
// we want to repeat the animation everytime the the element is out of vide and back again
|
|
711
713
|
triggered = false;
|
|
714
|
+
assign(element.style, animation.steps[0].styles);
|
|
712
715
|
}
|
|
713
716
|
}
|
|
714
717
|
// TODO: roll all of these in one for more efficiency of checking all the rects
|
|
@@ -717,8 +720,8 @@
|
|
|
717
720
|
function isScrolledIntoView(elem) {
|
|
718
721
|
var rect = elem.getBoundingClientRect();
|
|
719
722
|
var windowHeight = window.innerHeight;
|
|
720
|
-
var
|
|
721
|
-
var threshold =
|
|
723
|
+
var thresholdPercent = animation.thresholdPercent || 0;
|
|
724
|
+
var threshold = thresholdPercent * windowHeight;
|
|
722
725
|
// TODO: partial in view? or what if element is larger than screen itself
|
|
723
726
|
return (rect.bottom > threshold && rect.top < windowHeight - threshold // Element is peeking top or bottom
|
|
724
727
|
// (rect.top > 0 && rect.bottom < window.innerHeight) || // element fits within the screen and is fully on screen (not hanging off at all)
|