| 22 | } |
| 23 | |
| 24 | bool 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 | |
| 35 | bool interaction::Pan::onPanEnd(event::Event &event) { |
| 36 | this->chart_->interactionContext_->UpdateTicks(); |