지표 선택 마우스 스크롤

This commit is contained in:
Macbook
2026-06-16 10:23:06 +09:00
parent c7b92dbec5
commit 484f477d6c
3 changed files with 19 additions and 2 deletions
@@ -93,6 +93,21 @@ export default function ConditionPresetPicker({
};
}, [onClose]);
/** 그래프 모드: 팝업 위 휠 스크롤이 React Flow 줌으로 전달되지 않도록 차단 */
useEffect(() => {
const el = popRef.current;
if (!el) return;
const onWheel = (e: WheelEvent) => {
e.stopPropagation();
};
el.addEventListener('wheel', onWheel, { capture: true, passive: true });
return () => el.removeEventListener('wheel', onWheel, { capture: true });
}, []);
const stopWheelBubble = (e: React.WheelEvent) => {
e.stopPropagation();
};
const handlePick = (preset: ConditionPreset) => {
if (isCompoundConditionPreset(preset)) {
onReplaceNode(applyCompoundConditionPreset(nodeId, condition, preset, def));
@@ -104,7 +119,7 @@ export default function ConditionPresetPicker({
if (presets.length === 0) {
return (
<div ref={popRef} className={popoverClassName} role="dialog" aria-label="조건 선택">
<div ref={popRef} className={popoverClassName} role="dialog" aria-label="조건 선택" onWheel={stopWheelBubble}>
<div className="se-cond-preset-head">
<span> </span>
<button type="button" className="se-flow-settings-close" onClick={onClose} aria-label="닫기">×</button>
@@ -115,7 +130,7 @@ export default function ConditionPresetPicker({
}
return (
<div ref={popRef} className={popoverClassName} role="dialog" aria-label="조건 선택">
<div ref={popRef} className={popoverClassName} role="dialog" aria-label="조건 선택" onWheel={stopWheelBubble}>
<div className="se-cond-preset-head">
<span> </span>
<button type="button" className="se-flow-settings-close" onClick={onClose} aria-label="닫기">×</button>