|
|
|
@ -19,14 +19,14 @@ import {
|
|
|
|
|
|
|
|
|
|
function get_each_context(ctx, list, i) {
|
|
|
|
|
const child_ctx = ctx.slice();
|
|
|
|
|
child_ctx[2] = list[i];
|
|
|
|
|
child_ctx[1] = list[i];
|
|
|
|
|
return child_ctx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// (19:0) {#each things as thing (thing.id)}
|
|
|
|
|
function create_each_block(key_1, ctx) {
|
|
|
|
|
let div;
|
|
|
|
|
let t_value = /*thing*/ ctx[2].name + "";
|
|
|
|
|
let t_value = /*thing*/ ctx[1].name + "";
|
|
|
|
|
let t;
|
|
|
|
|
let rect;
|
|
|
|
|
let stop_animation = noop;
|
|
|
|
@ -44,7 +44,7 @@ function create_each_block(key_1, ctx) {
|
|
|
|
|
append(div, t);
|
|
|
|
|
},
|
|
|
|
|
p(ctx, dirty) {
|
|
|
|
|
if (dirty & /*things*/ 1 && t_value !== (t_value = /*thing*/ ctx[2].name + "")) set_data(t, t_value);
|
|
|
|
|
if (dirty & /*things*/ 1 && t_value !== (t_value = /*thing*/ ctx[1].name + "")) set_data(t, t_value);
|
|
|
|
|
},
|
|
|
|
|
r() {
|
|
|
|
|
rect = div.getBoundingClientRect();
|
|
|
|
@ -55,7 +55,7 @@ function create_each_block(key_1, ctx) {
|
|
|
|
|
},
|
|
|
|
|
a() {
|
|
|
|
|
stop_animation();
|
|
|
|
|
stop_animation = create_animation(div, rect, /*foo*/ ctx[1], {});
|
|
|
|
|
stop_animation = create_animation(div, rect, foo, {});
|
|
|
|
|
},
|
|
|
|
|
d(detaching) {
|
|
|
|
|
if (detaching) detach(div);
|
|
|
|
@ -68,7 +68,7 @@ function create_fragment(ctx) {
|
|
|
|
|
let each_1_lookup = new Map();
|
|
|
|
|
let each_1_anchor;
|
|
|
|
|
let each_value = /*things*/ ctx[0];
|
|
|
|
|
const get_key = ctx => /*thing*/ ctx[2].id;
|
|
|
|
|
const get_key = ctx => /*thing*/ ctx[1].id;
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < each_value.length; i += 1) {
|
|
|
|
|
let child_ctx = get_each_context(ctx, each_value, i);
|
|
|
|
@ -109,28 +109,28 @@ function create_fragment(ctx) {
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
|
let { things } = $$props;
|
|
|
|
|
function foo(node, animation, params) {
|
|
|
|
|
const dx = animation.from.left - animation.to.left;
|
|
|
|
|
const dy = animation.from.top - animation.to.top;
|
|
|
|
|
|
|
|
|
|
function foo(node, animation, params) {
|
|
|
|
|
const dx = animation.from.left - animation.to.left;
|
|
|
|
|
const dy = animation.from.top - animation.to.top;
|
|
|
|
|
return {
|
|
|
|
|
delay: params.delay,
|
|
|
|
|
duration: 100,
|
|
|
|
|
tick: (t, u) => {
|
|
|
|
|
node.dx = u * dx;
|
|
|
|
|
node.dy = u * dy;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
delay: params.delay,
|
|
|
|
|
duration: 100,
|
|
|
|
|
tick: (t, u) => {
|
|
|
|
|
node.dx = u * dx;
|
|
|
|
|
node.dy = u * dy;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
function instance($$self, $$props, $$invalidate) {
|
|
|
|
|
let { things } = $$props;
|
|
|
|
|
|
|
|
|
|
$$self.$set = $$props => {
|
|
|
|
|
if ("things" in $$props) $$invalidate(0, things = $$props.things);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
return [things, foo];
|
|
|
|
|
return [things];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Component extends SvelteComponent {
|
|
|
|
|