MerginMaps / mobile

Mobile app for Mergin Maps 📲. Open QGIS projects and manage vector data on your phone, even offline 📶 (Android/iOS/Windows app)
https://merginmaps.com
GNU General Public License v2.0
292 stars 64 forks source link

fix centering when preview panel is opened #3293

Closed uclaros closed 4 months ago

uclaros commented 4 months ago

Fixes #3260

github-actions[bot] commented 4 months ago

Pull Request Test Coverage Report for Build 8643196121

Details


Files with Coverage Reduction New Missed Lines %
input/app/projectsmodel.cpp 1 65.75%
input/app/inpututils.cpp 306 51.51%
<!-- Total: 307 -->
Totals Coverage Status
Change from base Build 8628227245: -0.04%
Covered Lines: 7580
Relevant Lines: 12629

💛 - Coveralls
uclaros commented 4 months ago

What's also not used any more is the considerMapExtentOffset parameter in

  function centerToPair( pair, considerMapExtentOffset = false ) {
    if ( considerMapExtentOffset )
      var mapExtentOffsetRatio = mapExtentOffset / mapCanvas.height
    else
      mapExtentOffsetRatio = 0

    __inputUtils.setExtentToFeature( pair, mapCanvas.mapSettings, mapExtentOffsetRatio )
  }

and the relevant code in InputUtils::setExtentToFeature() Should I remove those?

tomasMizera commented 4 months ago

What's also not used any more is the considerMapExtentOffset parameter in

  function centerToPair( pair, considerMapExtentOffset = false ) {
    if ( considerMapExtentOffset )
      var mapExtentOffsetRatio = mapExtentOffset / mapCanvas.height
    else
      mapExtentOffsetRatio = 0

    __inputUtils.setExtentToFeature( pair, mapCanvas.mapSettings, mapExtentOffsetRatio )
  }

and the relevant code in InputUtils::setExtentToFeature() Should I remove those?

Sure, if it is not used anymore, let's remove it