mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-15 01:31:14 +09:00
clean up
This commit is contained in:
parent
dc4a814490
commit
8ce1a32615
@ -138,7 +138,7 @@ let ro2: ResizeObserver | null;
|
|||||||
|
|
||||||
function renderTab() {
|
function renderTab() {
|
||||||
const tabEl = props.tab ? tabRefs[props.tab] : undefined;
|
const tabEl = props.tab ? tabRefs[props.tab] : undefined;
|
||||||
if (tabEl && tabEl.parentElement && tabHighlightEl && tabHighlightEl.parentElement) {
|
if (tabEl && tabHighlightEl && tabHighlightEl.parentElement) {
|
||||||
// offsetWidth や offsetLeft は少数を丸めてしまうため getBoundingClientRect を使う必要がある
|
// offsetWidth や offsetLeft は少数を丸めてしまうため getBoundingClientRect を使う必要がある
|
||||||
// https://developer.mozilla.org/ja/docs/Web/API/HTMLElement/offsetWidth#%E5%80%A4
|
// https://developer.mozilla.org/ja/docs/Web/API/HTMLElement/offsetWidth#%E5%80%A4
|
||||||
const parentRect = tabHighlightEl.parentElement.getBoundingClientRect();
|
const parentRect = tabHighlightEl.parentElement.getBoundingClientRect();
|
||||||
|
Loading…
Reference in New Issue
Block a user