-
Notifications
You must be signed in to change notification settings - Fork 86
Rework handling of panning to identified features #4591
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
base: master
Are you sure you want to change the base?
Changes from all commits
3321e9f
436777a
a63de42
c5e5d4f
c9b8b3d
516683f
4f45e09
fcce50f
826bfcf
c88015e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,15 +104,16 @@ ApplicationWindow { | |
| projDialog.open() | ||
| } | ||
|
|
||
| function identifyFeature( pair ) { | ||
| let hasNullGeometry = pair.feature.geometry.isNull | ||
| function identifyFeature( pair, point = null ) { | ||
| map.identifyLocation = point | ||
|
|
||
| if ( hasNullGeometry ) { | ||
| const skipPreview = __inputUtils.isEmptyGeometry( pair.feature.geometry ) | ||
| if ( skipPreview ) { | ||
| formsStackManager.openForm( pair, "readOnly", "form" ) | ||
| } | ||
| else if ( pair.valid ) { | ||
| map.highlightPair( pair ) | ||
| formsStackManager.openForm( pair, "readOnly", "preview") | ||
| formsStackManager.openForm( pair, "readOnly", "preview" ) | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -180,8 +181,8 @@ ApplicationWindow { | |
| return 0 | ||
| } | ||
|
|
||
| onFeatureIdentified: function( pair ) { | ||
| formsStackManager.openForm( pair, "readOnly", "preview" ); | ||
| onFeatureIdentified: function( pair, point ) { | ||
| window.identifyFeature( pair, point ) | ||
| } | ||
|
|
||
| onFeaturesIdentified: function( pairs ) { | ||
|
|
@@ -190,6 +191,7 @@ ApplicationWindow { | |
| } | ||
|
|
||
| onNothingIdentified: { | ||
| map.hideHighlight() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the highlight should be managed mainly by
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right now this is not the case, the form hides highlights on close, and |
||
| formsStackManager.closeDrawer() | ||
| } | ||
|
uclaros marked this conversation as resolved.
|
||
|
|
||
|
|
@@ -860,8 +862,8 @@ ApplicationWindow { | |
| closeDrawer() | ||
| } | ||
|
|
||
| onPreviewPanelChanged: function( panelHeight ) { | ||
| map.jumpToHighlighted( panelHeight - mapToolbar.height ) | ||
| onPreviewPanelChanged: { | ||
| map.jumpToHighlighted() | ||
| } | ||
|
uclaros marked this conversation as resolved.
|
||
| } | ||
|
|
||
|
|
@@ -952,15 +954,13 @@ ApplicationWindow { | |
| drawerHeader.title: qsTr( "Select feature" ) | ||
| list.model: MM.StaticFeaturesModel {} | ||
|
|
||
| list. delegate: MMListDelegate { | ||
| list.delegate: MMListDelegate { | ||
| text: model.FeatureTitle | ||
| secondaryText: model.LayerName | ||
| leftContent: MMIcon { source: model.LayerIcon } | ||
| onClicked: { | ||
| let pair = model.FeaturePair | ||
| featurePairSelection.close() | ||
| map.highlightPair( pair ) | ||
| formsStackManager.openForm( pair, "readOnly", "preview" ); | ||
| window.identifyFeature( model.FeaturePair ); | ||
| } | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.