코드정리
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user