|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
import { appendNode, assign, createElement, createText, detachNode, init, insertNode, proto } from "svelte/shared.js";
|
|
|
|
|
|
|
|
|
|
function create_main_fragment(state, component) {
|
|
|
|
|
var window_updating = false, text, p, text_1, text_2;
|
|
|
|
|
var window_updating = false, p, text, text_1;
|
|
|
|
|
|
|
|
|
|
function onwindowscroll(event) {
|
|
|
|
|
window_updating = true;
|
|
|
|
@ -11,7 +11,7 @@ function create_main_fragment(state, component) {
|
|
|
|
|
y: this.scrollY
|
|
|
|
|
});
|
|
|
|
|
window_updating = false;
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
window.addEventListener("scroll", onwindowscroll);
|
|
|
|
|
|
|
|
|
|
component.observe("y", function(y) {
|
|
|
|
@ -21,27 +21,24 @@ function create_main_fragment(state, component) {
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
c: function create() {
|
|
|
|
|
text = createText("\n\n");
|
|
|
|
|
p = createElement("p");
|
|
|
|
|
text_1 = createText("scrolled to ");
|
|
|
|
|
text_2 = createText(state.y);
|
|
|
|
|
text = createText("scrolled to ");
|
|
|
|
|
text_1 = createText(state.y);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
m: function mount(target, anchor) {
|
|
|
|
|
insertNode(text, target, anchor);
|
|
|
|
|
insertNode(p, target, anchor);
|
|
|
|
|
appendNode(text, p);
|
|
|
|
|
appendNode(text_1, p);
|
|
|
|
|
appendNode(text_2, p);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
p: function update(changed, state) {
|
|
|
|
|
if (changed.y) {
|
|
|
|
|
text_2.data = state.y;
|
|
|
|
|
text_1.data = state.y;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
u: function unmount() {
|
|
|
|
|
detachNode(text);
|
|
|
|
|
detachNode(p);
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|