Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PROG2900
Manage
Activity
Members
Labels
Plan
Issues
7
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sara Savanovic Djordjevic
PROG2900
Commits
2d127437
Commit
2d127437
authored
10 months ago
by
Sara Savanovic Djordjevic
Browse files
Options
Downloads
Patches
Plain Diff
update: minor fix of zoom behavior
parent
b61033d0
No related branches found
Branches containing commit
No related tags found
1 merge request
!19
Clhp map, license agreement
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/lib/widgets/choropleth_map.dart
+2
-0
2 additions, 0 deletions
app/lib/widgets/choropleth_map.dart
app/lib/widgets/main_layout.dart
+1
-8
1 addition, 8 deletions
app/lib/widgets/main_layout.dart
with
3 additions
and
8 deletions
app/lib/widgets/choropleth_map.dart
+
2
−
0
View file @
2d127437
...
...
@@ -38,9 +38,11 @@ class ChoroplethMapState extends State<ChoroplethMap> {
_initDataSource
();
}
/// Resets the map zoom level
void
resetZoom
()
{
setState
(()
{
_zoomPanBehavior
.
zoomLevel
=
1
;
_choroplethMapKey
.
currentState
?.
resetZoom
();
});
}
...
...
This diff is collapsed.
Click to expand it.
app/lib/widgets/main_layout.dart
+
1
−
8
View file @
2d127437
...
...
@@ -77,13 +77,6 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
});
}
/// Reset the map zoom and centering
void
resetZoom
()
{
setState
(()
{
_choroplethMapKey
.
currentState
?.
resetZoom
();
});
}
@override
Widget
build
(
BuildContext
context
)
{
// Initialise selectedMarker to first element in markerList
...
...
@@ -248,8 +241,8 @@ class _MapContainerWidgetState extends State<MapContainerWidget> {
onTapUp:
(
_
)
{
setState
(()
{
centerMap
=
false
;
_choroplethMapKey
.
currentState
?.
resetZoom
();
});
resetZoom
();
// Reset the map zoom
},
onTapCancel:
()
{
setState
(()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment