feat: add vertical drawing toolbar on market chart
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" media="print" onload="this.media='all'" />
|
||||
<noscript><link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Orbitron:wght@500;600;700&display=swap" rel="stylesheet" /></noscript>
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260607-hub-archive-v5" />
|
||||
<link rel="stylesheet" href="/assets/app.css?v=20260608-market-draw-v1" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="app-bg" aria-hidden="true"></div>
|
||||
@@ -169,17 +169,60 @@
|
||||
<div id="market-pos-orders" class="market-pos-orders"></div>
|
||||
</div>
|
||||
<div class="market-chart-body">
|
||||
<button type="button" id="market-chart-fs-exit" class="ghost market-fs-exit hidden" title="退出全屏 (Esc)">退出全屏</button>
|
||||
<div id="market-exchange-badge" class="market-exchange-badge" aria-hidden="true"></div>
|
||||
<div id="market-chart" class="market-chart-host"></div>
|
||||
<div id="market-price-tag" class="market-price-tag hidden" aria-hidden="true">
|
||||
<div class="market-price-tag-head">
|
||||
<span class="market-price-tag-label">现价</span>
|
||||
<span id="market-price-tag-value" class="market-price-tag-value"></span>
|
||||
<aside id="market-draw-toolbar" class="market-draw-toolbar" aria-label="画线工具">
|
||||
<button type="button" class="market-draw-btn is-active" data-tool="cursor" title="光标(拖动缩放图表)">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M4 4l7 16 2.5-5.5L20 12z"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="hline" title="水平线">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M4 12h16"/><circle cx="12" cy="12" r="2" fill="currentColor"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="cross" title="十字线">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M12 4v16M4 12h16"/><rect x="6" y="6" width="12" height="12" fill="none" stroke="currentColor" stroke-width="1.2"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="channel" title="平行通道">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M5 16L19 6M7 19L21 9"/><circle cx="5" cy="16" r="1.5" fill="currentColor"/><circle cx="19" cy="6" r="1.5" fill="currentColor"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="rect" title="矩形">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><rect x="5" y="7" width="14" height="10" fill="none" stroke="currentColor" stroke-width="1.6"/><circle cx="5" cy="7" r="1.3" fill="currentColor"/><circle cx="19" cy="17" r="1.3" fill="currentColor"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="brush" title="画笔">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M4 18l8-2 2-8 6-2-2 6-8 2z"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="range" title="价格测距">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M12 5v14M8 8h8M8 16h8"/><path fill="currentColor" d="M11 4h2v3h-2zm0 13h2v3h-2z"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn market-draw-btn-text" data-tool="text" title="文字">T</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="fib" title="斐波那契">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.4" d="M4 6h16M4 10h16M4 14h16M4 18h16"/><circle cx="20" cy="6" r="1.2" fill="currentColor"/><circle cx="20" cy="18" r="1.2" fill="currentColor"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="trend" title="趋势线">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M5 18L19 6"/><circle cx="5" cy="18" r="1.5" fill="currentColor"/><circle cx="19" cy="6" r="1.5" fill="currentColor"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="path" title="折线箭头(双击结束)">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.6" d="M5 16L10 12L14 15L19 7"/><path fill="currentColor" d="M17 5l3 3-3 1z"/></svg>
|
||||
</button>
|
||||
<span class="market-draw-sep" aria-hidden="true"></span>
|
||||
<button type="button" class="market-draw-btn" data-tool="erase" title="删除选中">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M9 3h6l1 2h4v2H4V5h4zm1 6h2v9h-2zm4 0h2v9h-2zM7 7h10l-1 14H8z"/></svg>
|
||||
</button>
|
||||
<button type="button" class="market-draw-btn" data-tool="clear" title="清除全部画线">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true"><path fill="none" stroke="currentColor" stroke-width="1.8" d="M6 6l12 12M18 6L6 18"/></svg>
|
||||
</button>
|
||||
</aside>
|
||||
<div class="market-chart-main">
|
||||
<button type="button" id="market-chart-fs-exit" class="ghost market-fs-exit hidden" title="退出全屏 (Esc)">退出全屏</button>
|
||||
<div id="market-exchange-badge" class="market-exchange-badge" aria-hidden="true"></div>
|
||||
<div id="market-chart" class="market-chart-host"></div>
|
||||
<canvas id="market-draw-canvas" class="market-draw-canvas" aria-hidden="true"></canvas>
|
||||
<div id="market-price-tag" class="market-price-tag hidden" aria-hidden="true">
|
||||
<div class="market-price-tag-head">
|
||||
<span class="market-price-tag-label">现价</span>
|
||||
<span id="market-price-tag-value" class="market-price-tag-value"></span>
|
||||
</div>
|
||||
<div id="market-price-tag-time" class="market-price-tag-time"></div>
|
||||
</div>
|
||||
<div id="market-price-tag-time" class="market-price-tag-time"></div>
|
||||
<button type="button" id="market-price-auto" class="market-price-auto is-on" title="开启:价格轴与视口随刷新自动调整;关闭:后台静默更新,保留当前缩放">自动</button>
|
||||
</div>
|
||||
<button type="button" id="market-price-auto" class="market-price-auto is-on" title="开启:价格轴与视口随刷新自动调整;关闭:后台静默更新,保留当前缩放">自动</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -349,7 +392,8 @@
|
||||
|
||||
<div id="toast"></div>
|
||||
<script src="https://unpkg.com/lightweight-charts@4.2.0/dist/lightweight-charts.standalone.production.js"></script>
|
||||
<script src="/assets/chart.js?v=20260608-clear-refetch"></script>
|
||||
<script src="/assets/chart_draw.js?v=20260608-market-draw-v1"></script>
|
||||
<script src="/assets/chart.js?v=20260608-market-draw-v1"></script>
|
||||
<script src="/assets/archive.js?v=20260607-hub-archive-v6"></script>
|
||||
<script src="/assets/ai_review_render.js?v=2"></script>
|
||||
<script src="/assets/app.js?v=20260607-hub-archive-v1"></script>
|
||||
|
||||
Reference in New Issue
Block a user