From 1360b2a54745531ef994c8efc594ed3f48e30244 Mon Sep 17 00:00:00 2001 From: pngwn Date: Fri, 26 Jul 2019 17:55:29 +0100 Subject: [PATCH] Reorder svelte files to match other examples. --- .../examples/11-easing/00-easing/App.svelte | 70 ++++----- .../11-easing/00-easing/Controls.svelte | 137 +++++++++--------- .../examples/11-easing/00-easing/Grid.svelte | 28 ++-- 3 files changed, 119 insertions(+), 116 deletions(-) diff --git a/site/content/examples/11-easing/00-easing/App.svelte b/site/content/examples/11-easing/00-easing/App.svelte index ef412f9198..d443f63813 100644 --- a/site/content/examples/11-easing/00-easing/App.svelte +++ b/site/content/examples/11-easing/00-easing/App.svelte @@ -20,11 +20,16 @@ async function runAnimations() { playing = true; + value.set(1000, {duration: 0}); time.set(0, {duration: 0}); + await ease_path.set(current.shape); - time.set(1000, {duration, easing: x => x}); - await value.set(0, {duration, easing: current.fn}); + await Promise.all([ + time.set(1000, {duration, easing: x => x}), + value.set(0, {duration, easing: current.fn}) + ]) + playing = false; } @@ -32,6 +37,35 @@ $: current && runAnimations(); + +
@@ -69,34 +103,4 @@ bind:current_type on:play={runAnimations} /> -
- - + \ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Controls.svelte b/site/content/examples/11-easing/00-easing/Controls.svelte index ced7c1cda9..b6798186a2 100644 --- a/site/content/examples/11-easing/00-easing/Controls.svelte +++ b/site/content/examples/11-easing/00-easing/Controls.svelte @@ -12,76 +12,8 @@ const dispatch = createEventDispatcher(); $: mobile = width && width < 600 - -
-
-

Ease

- {#if mobile} - - {:else} -
    - {#each [...eases] as [name]} -
  • current_ease = name} - > - {name} -
  • - {/each} -
- {/if} -

Type

- {#if mobile } - - {:else} -
    - {#each types as [name, type]} -
  • current_type = type} - > - {name} -
  • - {/each} -
- {/if} -
-

- Duration -

-
- - - - - - -
- - -
- \ No newline at end of file + + +
+
+

Ease

+ {#if mobile} + + {:else} +
    + {#each [...eases] as [name]} +
  • current_ease = name} + > + {name} +
  • + {/each} +
+ {/if} +

Type

+ {#if mobile } + + {:else} +
    + {#each types as [name, type]} +
  • current_type = type} + > + {name} +
  • + {/each} +
+ {/if} +
+

+ Duration +

+
+ + + + + + +
+ + +
\ No newline at end of file diff --git a/site/content/examples/11-easing/00-easing/Grid.svelte b/site/content/examples/11-easing/00-easing/Grid.svelte index fd8715e57c..e704f46cf7 100644 --- a/site/content/examples/11-easing/00-easing/Grid.svelte +++ b/site/content/examples/11-easing/00-easing/Grid.svelte @@ -2,6 +2,19 @@ export let x, y; + + - - \ No newline at end of file +/> \ No newline at end of file