Merge pull request #825 from hgiesel/mathjax3plus2
Switch from jQuery pre 3.0.0 pseudo promises to ES6 promises for ts hooks
This commit is contained in:
commit
f65f101a16
@ -39,8 +39,7 @@ function _updateQA(html, fadeTime, onupdate, onshown) {
|
|||||||
var qa = $("#qa");
|
var qa = $("#qa");
|
||||||
|
|
||||||
// fade out current text
|
// fade out current text
|
||||||
qa.fadeOut(fadeTime)
|
new Promise((resolve) => qa.fadeOut(fadeTime, () => resolve()))
|
||||||
.promise()
|
|
||||||
// update text
|
// update text
|
||||||
.then(() => {
|
.then(() => {
|
||||||
try {
|
try {
|
||||||
@ -66,7 +65,7 @@ function _updateQA(html, fadeTime, onupdate, onshown) {
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
// and reveal when processing is done
|
// and reveal when processing is done
|
||||||
.then(() => qa.fadeIn(fadeTime).promise())
|
.then(() => new Promise((resolve) => qa.fadeIn(fadeTime, () => resolve())))
|
||||||
.then(() => _runHook(onShownHook))
|
.then(() => _runHook(onShownHook))
|
||||||
.then(() => (_updatingQA = false));
|
.then(() => (_updatingQA = false));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user