diff options
| author | Johann150 <johann.galle@protonmail.com> | 2022-05-26 15:53:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-26 22:53:09 +0900 |
| commit | 3dae18b93cc2a219087c4e1a8acc763ff064b71d (patch) | |
| tree | ee00206569ab940f7e1af154452123567c4d92f8 /packages/client/src/components/ui/button.vue | |
| parent | use http-signature module that supports hs2019 (#8635) (diff) | |
| download | misskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.tar.gz misskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.tar.bz2 misskey-3dae18b93cc2a219087c4e1a8acc763ff064b71d.zip | |
fix lints (#8737)
* fix: emits use ev instead of e
* fix: errors use err instead of e
* fix: replace use of data where possible
* fix: events use evt instead of e
* fix: use strict equals
* fix: use emoji instead of e
* fix: vue lints
Diffstat (limited to 'packages/client/src/components/ui/button.vue')
| -rw-r--r-- | packages/client/src/components/ui/button.vue | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/client/src/components/ui/button.vue b/packages/client/src/components/ui/button.vue index c7b6c8ba96..fe8f1c7cca 100644 --- a/packages/client/src/components/ui/button.vue +++ b/packages/client/src/components/ui/button.vue @@ -90,7 +90,7 @@ export default defineComponent({ } }, methods: { - onMousedown(e: MouseEvent) { + onMousedown(evt: MouseEvent) { function distance(p, q) { return Math.hypot(p.x - q.x, p.y - q.y); } @@ -104,18 +104,18 @@ export default defineComponent({ return Math.max(dist1, dist2, dist3, dist4) * 2; } - const rect = e.target.getBoundingClientRect(); + const rect = evt.target.getBoundingClientRect(); const ripple = document.createElement('div'); - ripple.style.top = (e.clientY - rect.top - 1).toString() + 'px'; - ripple.style.left = (e.clientX - rect.left - 1).toString() + 'px'; + ripple.style.top = (evt.clientY - rect.top - 1).toString() + 'px'; + ripple.style.left = (evt.clientX - rect.left - 1).toString() + 'px'; this.$refs.ripples.appendChild(ripple); - const circleCenterX = e.clientX - rect.left; - const circleCenterY = e.clientY - rect.top; + const circleCenterX = evt.clientX - rect.left; + const circleCenterY = evt.clientY - rect.top; - const scale = calcCircleScale(e.target.clientWidth, e.target.clientHeight, circleCenterX, circleCenterY); + const scale = calcCircleScale(evt.target.clientWidth, evt.target.clientHeight, circleCenterX, circleCenterY); window.setTimeout(() => { ripple.style.transform = 'scale(' + (scale / 2) + ')'; |