Move view modifier to show

This commit is contained in:
carson 2020-07-06 09:36:03 -07:00
parent 83e20394ac
commit 38d587ef62

View File

@ -1337,8 +1337,8 @@ return (function () {
if (modifier.indexOf("scroll:") === 0) {
swapSpec["scroll"] = modifier.substr(7);
}
if (modifier.indexOf("view:") === 0) {
swapSpec["view"] = modifier.substr(5);
if (modifier.indexOf("show:") === 0) {
swapSpec["show"] = modifier.substr(5);
}
}
}
@ -1373,11 +1373,11 @@ return (function () {
target.scrollTop = target.scrollHeight;
}
}
if (swapSpec.view) {
if (swapSpec.view === "top") {
if (swapSpec.show) {
if (swapSpec.show === "top") {
target.scrollIntoView(true);
}
if (swapSpec.view === "bottom") {
if (swapSpec.show === "bottom") {
target.scrollIntoView(false);
}
}