diff --git a/routes/_components/IconButton.html b/routes/_components/IconButton.html index 8061f87..ded5ba3 100644 --- a/routes/_components/IconButton.html +++ b/routes/_components/IconButton.html @@ -105,17 +105,6 @@ import { store } from '../_store/store' export default { - oncreate () { - this.observe('animation', animation => { - let { reduceMotion } = this.store.get() - if (!animation || reduceMotion) { - return - } - let svg = this.refs.svg - let animations = animation.map(({properties, options}) => svg.animate(properties, options)) - animations.forEach(anim => anim.play()) - }) - }, store: () => store, computed: { computedClass: (pressable, pressed, big, muted, className) => { @@ -128,6 +117,17 @@ className ) } + }, + methods: { + animate (animation) { + let { reduceMotion } = this.store.get() + if (!animation || reduceMotion) { + return + } + let svg = this.refs.svg + let animations = animation.map(({properties, options}) => svg.animate(properties, options)) + animations.forEach(anim => anim.play()) + } } } \ No newline at end of file diff --git a/routes/_components/profile/AccountProfileFollow.html b/routes/_components/profile/AccountProfileFollow.html index d58658d..ec720b3 100644 --- a/routes/_components/profile/AccountProfileFollow.html +++ b/routes/_components/profile/AccountProfileFollow.html @@ -6,7 +6,7 @@ pressed="{{following}}" big="true" on:click="onFollowButtonClick(event)" - animation="{{animateFollowButton && followButtonAnimation}}" + ref:icon />