enhance(frontend): アニメーション設定で画面上のエフェクトも考慮するように (#15576)
* enhance(frontend): アニメーション設定で画面上のエフェクトも考慮するように * Update Changelog
This commit is contained in:
parent
59567a7ccc
commit
01a3eabc4e
7 changed files with 10 additions and 7 deletions
|
|
@ -413,7 +413,7 @@ function computeButtonTitle(ev: MouseEvent): void {
|
|||
|
||||
function chosen(emoji: string | Misskey.entities.EmojiSimple | UnicodeEmojiDef, ev?: MouseEvent) {
|
||||
const el = ev && (ev.currentTarget ?? ev.target) as HTMLElement | null | undefined;
|
||||
if (el) {
|
||||
if (el && defaultStore.state.animation) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
const y = rect.top + (el.offsetHeight / 2);
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ function react(): void {
|
|||
reaction: '❤️',
|
||||
});
|
||||
const el = reactButton.value;
|
||||
if (el) {
|
||||
if (el && defaultStore.state.animation) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
const y = rect.top + (el.offsetHeight / 2);
|
||||
|
|
|
|||
|
|
@ -442,7 +442,7 @@ function react(): void {
|
|||
reaction: '❤️',
|
||||
});
|
||||
const el = reactButton.value;
|
||||
if (el) {
|
||||
if (el && defaultStore.state.animation) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
const y = rect.top + (el.offsetHeight / 2);
|
||||
|
|
|
|||
|
|
@ -752,7 +752,7 @@ async function post(ev?: MouseEvent) {
|
|||
if (ev) {
|
||||
const el = (ev.currentTarget ?? ev.target) as HTMLElement | null;
|
||||
|
||||
if (el) {
|
||||
if (el && defaultStore.state.animation) {
|
||||
const rect = el.getBoundingClientRect();
|
||||
const x = rect.left + (el.offsetWidth / 2);
|
||||
const y = rect.top + (el.offsetHeight / 2);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue