코드정리

This commit is contained in:
yonghyon
2024-05-23 20:19:52 +09:00
parent 5b7e4b2822
commit f4cea5eef0
3 changed files with 4 additions and 4 deletions

View File

@@ -25,7 +25,7 @@ export default function useScrollTopByDistance() {
const distance = targetRect.top - markerRect.top - scaleH(gap);
jobRef.current.start(() => scrollTop({ y: distance }));
jobRef.current.start(() => scrollTop({ y: distance >=0 ? distance : 0 }));
} catch (error) {
console.error(error.message);
}

View File

@@ -279,9 +279,9 @@ export const getSpottableDescendants = (containerId) => {
export const isElementInContainer = (element, container) => {
// 요소와 컨테이너의 사각형 정보 가져오기
if (typeof window === "object") {
const elementRect = element.getBoundingClientRect();
const elementRect = getBoundingClientRect(element);
const containerRect = container
? container.getBoundingClientRect()
? getBoundingClientRect(container)
: {
top: 0,
left: 0,

View File

@@ -9,7 +9,7 @@ import Spottable from "@enact/spotlight/Spottable";
import noGroupImg from "../../../../assets/images/img-my-info-billing@3x.png";
import { pushPanel } from "../../../actions/panelActions";
import TScroller from "../../../components/TScroller/TScroller";
import { panel_names } from "../../../utils/Config";
import { LOG_MENU, panel_names } from "../../../utils/Config";
import { $L } from "../../../utils/helperMethods";
import css from "./GroupOption.module.less";
import useLogService from "../../../hooks/useLogService";