Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix centering when preview panel is opened #3293

Merged
merged 3 commits into from
Apr 11, 2024
Merged

fix centering when preview panel is opened #3293

merged 3 commits into from
Apr 11, 2024

Conversation

uclaros
Copy link
Contributor

@uclaros uclaros commented Apr 10, 2024

Fixes #3260

  • Preview panel height is taken into account when centering to the identified feature
  • Animation is used while centering
  • If follow gps was enabled, map pans back to gps position after closing the preview panel

Copy link

github-actions bot commented Apr 10, 2024

Pull Request Test Coverage Report for Build 8643196121

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 307 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.04%) to 60.021%

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

💛 - Coveralls

app/inpututils.cpp Show resolved Hide resolved
app/qml/main.qml Outdated Show resolved Hide resolved
app/qml/map/MMMapController.qml Show resolved Hide resolved
@uclaros
Copy link
Contributor Author

uclaros commented Apr 11, 2024

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
Copy link
Collaborator

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

@tomasMizera tomasMizera merged commit ab07237 into master Apr 11, 2024
11 checks passed
@tomasMizera tomasMizera deleted the fix-3260 branch April 11, 2024 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Center map extent when feature is identified
2 participants