Add project files.

This commit is contained in:
login
2025-05-06 02:04:49 +07:00
parent b387f4e283
commit e1980fe6a2
333 changed files with 128684 additions and 0 deletions

View File

@ -0,0 +1,38 @@
export default class ATransitionEffect {
constructor() { }
collapsedEffect(e, c = null, maxHeight = null) {
var height = (maxHeight == null || e.scrollHeight <= maxHeight) ? e.scrollHeight : maxHeight;
var transition = e.style.transition;
e.style.transition = '';
requestAnimationFrame(function () {
e.style.height = height + 'px';
e.style.opacity = 1;
e.style.transition = transition;
requestAnimationFrame(function () {
e.style.height = 0 + 'px';
e.style.opacity = .3
});
});
var f = function (ev) {
if (ev.propertyName == "height") {
ev.target.classList.remove('show');
if (c != null) c.call();
}
ev.target.removeEventListener("transitionend", f, false);
};
e.addEventListener('transitionend', f, false);
}
expandEffect(e, c = null, maxHeight = null) {
e.style.opacity = 1;
e.style.height = ((maxHeight == null || e.scrollHeight <= maxHeight) ? e.scrollHeight : maxHeight) + 'px';
var f = function (ev) {
if (ev.propertyName == "height") {
ev.target.classList.add("show");
ev.target.style.height = null;
if (c != null) c.call();
ev.target.removeEventListener("transitionend", f, false);
}
}
e.addEventListener('transitionend', f, false);
}
}