void MyPositionController::DragEnded(m2::PointD const & distance) { float const kBindingDistance = 0.1; m_needBlockAnimation = false; if (distance.Length() > kBindingDistance * min(m_pixelRect.SizeX(), m_pixelRect.SizeY())) StopLocationFollow(); UpdateViewport(kDoNotChangeZoom); }
void MyPositionController::ScaleEnded() { m_needBlockAnimation = false; if (m_wasRotationInScaling) { m_wasRotationInScaling = false; StopLocationFollow(); } UpdateViewport(kDoNotChangeZoom); }
void DrapeEngine::EnableChoosePositionMode(bool enable, vector<m2::TriangleD> && boundAreaTriangles, bool hasPosition, m2::PointD const & position) { m_choosePositionMode = enable; bool kineticScroll = m_kineticScrollEnabled; if (enable) { StopLocationFollow(); m_threadCommutator->PostMessage(ThreadsCommutator::ResourceUploadThread, make_unique_dp<ShowChoosePositionMarkMessage>(), MessagePriority::High); kineticScroll = false; } else { RecacheGui(true); } m_threadCommutator->PostMessage(ThreadsCommutator::RenderThread, make_unique_dp<SetAddNewPlaceModeMessage>(enable, move(boundAreaTriangles), kineticScroll, hasPosition, position), MessagePriority::High); }