지표 선택 마우스 스크롤
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user