feat(chart): Alt+Click removes nearest horizontal line
IPriceLine has no native click event, so use a coordinate-matching pattern: - On Alt+Click, compute candle.priceToCoordinate for each hline - Find the one whose y is closest to the click y - If within ±6px, remove it via removeLine Complements the chips ✕ button — clicking the line itself on the chart is more natural than aiming at a small ✕. Shift+Click for add still wins when both modifiers are held (more frequent, checked first). - StockChart toolbar title and ShortcutsHelp updated to surface the gesture
This commit is contained in:
@@ -24,6 +24,7 @@ const SHORTCUTS: Shortcut[] = [
|
||||
{ scope: "종목 페이지", keys: ["F"], label: "차트 전체화면 토글" },
|
||||
{ scope: "종목 페이지", keys: ["H"], label: "현재 가격에 수평선 추가" },
|
||||
{ scope: "종목 페이지", keys: ["Shift", "클릭"], label: "차트 위 클릭 위치에 수평선 추가" },
|
||||
{ scope: "종목 페이지", keys: ["Alt", "클릭"], label: "차트의 가장 가까운 수평선 제거" },
|
||||
{ scope: "종목 페이지", keys: ["←", "→"], label: "기간 탭 이전 / 다음" },
|
||||
{ scope: "종목 페이지", keys: ["S"], label: "관심종목 추가 / 제거" },
|
||||
{ scope: "검색 팝오버", keys: ["↑", "↓"], label: "결과 이동" },
|
||||
|
||||
Reference in New Issue
Block a user