updated
This commit is contained in:
@@ -10,7 +10,7 @@ import {
|
||||
getCSS,
|
||||
ElementStyleUtil,
|
||||
} from "../_utils/index";
|
||||
import { CookieComponent } from "./_CookieComponent";
|
||||
//import { CookieComponent } from "./_CookieComponent";
|
||||
|
||||
export interface ScrollOptions {
|
||||
saveState?: boolean;
|
||||
@@ -167,14 +167,14 @@ class ScrollComponent {
|
||||
|
||||
private setupState = () => {
|
||||
if (this.getOption("save-state") === true && this.id) {
|
||||
const cookie = CookieComponent.get(this.id + "st");
|
||||
if (cookie) {
|
||||
const pos = parseInt(cookie);
|
||||
// const cookie = CookieComponent.get(this.id + "st");
|
||||
// if (cookie) {
|
||||
// const pos = parseInt(cookie);
|
||||
|
||||
if (pos > 0) {
|
||||
this.element.scrollTop = pos;
|
||||
}
|
||||
}
|
||||
// if (pos > 0) {
|
||||
// this.element.scrollTop = pos;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
};
|
||||
|
||||
@@ -188,7 +188,7 @@ class ScrollComponent {
|
||||
|
||||
private scrollHandler = () => {
|
||||
const cookieId = this.id + "st";
|
||||
CookieComponent.set(cookieId, this.element.scrollTop, {});
|
||||
//CookieComponent.set(cookieId, this.element.scrollTop, {});
|
||||
};
|
||||
|
||||
private destroyScrollHandler = () => {
|
||||
|
||||
Reference in New Issue
Block a user