MCPcopy Create free account
hub / github.com/antvis/F2Native / OnPan

Method OnPan

core/graphics/interaction/Pan.cpp:24–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24bool interaction::Pan::OnPan(event::Event &event) {
25 // this->chart_->GetLogTracer()->trace("onPan type: %s direction: %s", event.eventType.data(), event.direction.data());
26 if(event.direction == "none" || event.direction == "up" || event.direction == "down") {
27 return false;
28 }
29
30 // double coordWidth = this->chart_->coord_->GetWidth();
31 // double ratio = event.deltaX / coordWidth;
32 return this->chart_->interactionContext_->DoMove(event.deltaX, event.deltaY);
33}
34
35bool interaction::Pan::onPanEnd(event::Event &event) {
36 this->chart_->interactionContext_->UpdateTicks();

Callers

nothing calls this directly

Calls 1

DoMoveMethod · 0.80

Tested by

no test coverage detected