Skip to content

Commit

Permalink
Merge branch 'main' into GitHub-Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
zxffffffff committed Jan 9, 2024
2 parents 2146068 + 9e6b429 commit 5860c78
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion stock-charts-cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ view->init(vm);
## 作者说明
- 精力有限,偶尔维护,有需要可以联系我答疑解惑([email protected], [email protected])。
- `star >= 100` 可以考虑更新绘图、叠加、复权等功能。
- Web(WASM)移植版本:https://github.com/zxffffffff/stock-charts-wasm.git
- WASM(Web)移植版本:https://github.com/zxffffffff/stock-charts-wasm.git
- Dart(Flutter)移植版本:https://github.com/zxffffffff/stock-charts-dart.git
## 参数控制
Expand Down
10 changes: 10 additions & 0 deletions stock-charts-cpp/lib-chart/ViewModel/ChartViewModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ namespace StockCharts
m_context.hoverNormal.price = NumberNull;
}

// mouse event
m_context.hoverSync.point.clear();
m_context.hoverSync.index = -1;
m_context.hoverSync.price = NumberNull;

for (const auto &layer : m_layers)
{
layer->onMouseMove(m_model, m_props, m_context);
Expand Down Expand Up @@ -418,6 +423,11 @@ namespace StockCharts

ChartCoordinate coordinate(m_props, m_context);

// mouse event
m_context.hoverNormal.point.clear();
m_context.hoverNormal.index = -1;
m_context.hoverNormal.price = NumberNull;

// mouse event
m_context.hoverSync.point = Point(
coordinate.index2pos(hoverIndex),
Expand Down

0 comments on commit 5860c78

Please sign in to comment.