| 1281 | } |
| 1282 | |
| 1283 | void FrontendRenderer::PullToBoundArea(bool randomPlace, bool applyZoom) |
| 1284 | { |
| 1285 | if (m_dragBoundArea.empty()) |
| 1286 | return; |
| 1287 | |
| 1288 | ScreenBase const & screen = m_userEventStream.GetCurrentScreen(); |
| 1289 | m2::PointD const center = screen.GlobalRect().Center(); |
| 1290 | if (!m2::IsPointInsideTriangles(center, m_dragBoundArea)) |
| 1291 | { |
| 1292 | m2::PointD const dest = randomPlace ? m2::GetRandomPointInsideTriangles(m_dragBoundArea) |
| 1293 | : m2::ProjectPointToTriangles(center, m_dragBoundArea); |
| 1294 | int zoom = kDoNotChangeZoom; |
| 1295 | if (applyZoom && GetCurrentZoom() < scales::GetAddNewPlaceScale()) |
| 1296 | zoom = scales::GetAddNewPlaceScale(); |
| 1297 | AddUserEvent(make_unique_dp<SetCenterEvent>(dest, zoom, true /* isAnim */, false /* trackVisibleViewport */, |
| 1298 | nullptr /* parallelAnimCreator */)); |
| 1299 | } |
| 1300 | } |
| 1301 | |
| 1302 | void FrontendRenderer::ProcessSelection(ref_ptr<SelectObjectMessage> msg) |
| 1303 | { |
nothing calls this directly
no test coverage detected