mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
mapwidget.qml: whitespace and ';' cleanup
The rest of the QML code in subsurface doesn't use the ';' to end a line of code or a declaration. Remove all the redundant ';'. Also clean extra blank lines. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
2d101b7252
commit
6299a3c93b
1 changed files with 14 additions and 17 deletions
|
@ -5,8 +5,7 @@ import QtPositioning 5.3
|
||||||
import org.subsurfacedivelog.mobile 1.0
|
import org.subsurfacedivelog.mobile 1.0
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
readonly property var esriMapTypeIndexes: { "STREET": 0, "SATELLITE": 1 }
|
||||||
readonly property var esriMapTypeIndexes: { "STREET": 0, "SATELLITE": 1 };
|
|
||||||
|
|
||||||
Plugin {
|
Plugin {
|
||||||
id: mapPlugin
|
id: mapPlugin
|
||||||
|
@ -24,18 +23,17 @@ Item {
|
||||||
plugin: mapPlugin
|
plugin: mapPlugin
|
||||||
zoomLevel: 1
|
zoomLevel: 1
|
||||||
|
|
||||||
readonly property var defaultCenter: QtPositioning.coordinate(0, 0);
|
readonly property var defaultCenter: QtPositioning.coordinate(0, 0)
|
||||||
readonly property var defaultZoomIn: 17.0;
|
readonly property var defaultZoomIn: 17.0
|
||||||
property var newCenter: defaultCenter;
|
property var newCenter: defaultCenter
|
||||||
property var newZoom: 1.0;
|
property var newZoom: 1.0
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
map.activeMapType = map.supportedMapTypes[esriMapTypeIndexes.SATELLITE];
|
map.activeMapType = map.supportedMapTypes[esriMapTypeIndexes.SATELLITE]
|
||||||
}
|
}
|
||||||
|
|
||||||
MapItemView {
|
MapItemView {
|
||||||
id: mapItemView
|
id: mapItemView
|
||||||
|
|
||||||
model: mapHelper.model
|
model: mapHelper.model
|
||||||
delegate: MapQuickItem {
|
delegate: MapQuickItem {
|
||||||
anchorPoint.x: 0
|
anchorPoint.x: 0
|
||||||
|
@ -43,11 +41,11 @@ Item {
|
||||||
coordinate: model.coordinate
|
coordinate: model.coordinate
|
||||||
z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0
|
z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0
|
||||||
sourceItem: Image {
|
sourceItem: Image {
|
||||||
id: mapItemImage;
|
id: mapItemImage
|
||||||
source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : "");
|
source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : "")
|
||||||
|
|
||||||
SequentialAnimation {
|
SequentialAnimation {
|
||||||
id: mapItemImageAnimation;
|
id: mapItemImageAnimation
|
||||||
PropertyAnimation {
|
PropertyAnimation {
|
||||||
target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120;
|
target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +56,7 @@ Item {
|
||||||
|
|
||||||
onSourceChanged: {
|
onSourceChanged: {
|
||||||
if (mapHelper.model.selectedUuid === model.uuid)
|
if (mapHelper.model.selectedUuid === model.uuid)
|
||||||
mapItemImageAnimation.restart();
|
mapItemImageAnimation.restart()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +71,6 @@ Item {
|
||||||
|
|
||||||
ParallelAnimation {
|
ParallelAnimation {
|
||||||
id: mapAnimation
|
id: mapAnimation
|
||||||
|
|
||||||
CoordinateAnimation {
|
CoordinateAnimation {
|
||||||
target: map
|
target: map
|
||||||
property: "center"
|
property: "center"
|
||||||
|
@ -90,10 +87,10 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
function centerOnMapLocation(mapLocation) {
|
function centerOnMapLocation(mapLocation) {
|
||||||
map.newCenter = mapLocation.coordinate;
|
map.newCenter = mapLocation.coordinate
|
||||||
map.zoomLevel = 2;
|
map.zoomLevel = 2
|
||||||
mapAnimation.restart();
|
mapAnimation.restart()
|
||||||
mapHelper.model.selectedUuid = mapLocation.uuid;
|
mapHelper.model.selectedUuid = mapLocation.uuid
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue