mirror of
https://github.com/bigskysoftware/htmx.git
synced 2025-11-16 21:37:32 +00:00
Added settlingClass and swappingClass to config variables
This commit is contained in:
parent
9ed66d5130
commit
3fd502af73
12
src/htmx.js
12
src/htmx.js
@ -1522,7 +1522,7 @@ return (function () {
|
|||||||
|
|
||||||
var swapSpec = getSwapSpecification(elt);
|
var swapSpec = getSwapSpecification(elt);
|
||||||
|
|
||||||
target.classList.add("htmx-swapping");
|
target.classList.add(htmx.config.swappingClass);
|
||||||
var doSwap = function () {
|
var doSwap = function () {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@ -1544,10 +1544,10 @@ return (function () {
|
|||||||
newActiveElt.focus();
|
newActiveElt.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
target.classList.remove("htmx-swapping");
|
target.classList.remove(htmx.config.swappingClass);
|
||||||
forEach(settleInfo.elts, function (elt) {
|
forEach(settleInfo.elts, function (elt) {
|
||||||
if (elt.classList) {
|
if (elt.classList) {
|
||||||
elt.classList.add("htmx-settling");
|
elt.classList.add(htmx.config.settlingClass);
|
||||||
}
|
}
|
||||||
triggerEvent(elt, 'afterSwap.htmx', eventDetail);
|
triggerEvent(elt, 'afterSwap.htmx', eventDetail);
|
||||||
});
|
});
|
||||||
@ -1560,7 +1560,7 @@ return (function () {
|
|||||||
});
|
});
|
||||||
forEach(settleInfo.elts, function (elt) {
|
forEach(settleInfo.elts, function (elt) {
|
||||||
if (elt.classList) {
|
if (elt.classList) {
|
||||||
elt.classList.remove("htmx-settling");
|
elt.classList.remove(htmx.config.settlingClass);
|
||||||
}
|
}
|
||||||
triggerEvent(elt, 'afterSettle.htmx', eventDetail);
|
triggerEvent(elt, 'afterSettle.htmx', eventDetail);
|
||||||
});
|
});
|
||||||
@ -1734,7 +1734,9 @@ return (function () {
|
|||||||
defaultSettleDelay:100,
|
defaultSettleDelay:100,
|
||||||
includeIndicatorStyles:true,
|
includeIndicatorStyles:true,
|
||||||
indicatorClass:'htmx-indicator',
|
indicatorClass:'htmx-indicator',
|
||||||
requestClass:'htmx-request'
|
requestClass:'htmx-request',
|
||||||
|
settlingClass:'htmx-settling',
|
||||||
|
swappingClass:'htmx-swapping',
|
||||||
},
|
},
|
||||||
parseInterval:parseInterval,
|
parseInterval:parseInterval,
|
||||||
_:internalEval,
|
_:internalEval,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user