Skip to content

Commit

Permalink
first approach to enhance highlights
Browse files Browse the repository at this point in the history
  • Loading branch information
VitorVieiraZ committed Aug 9, 2024
1 parent 15b66cf commit a410dfa
Showing 1 changed file with 67 additions and 32 deletions.
99 changes: 67 additions & 32 deletions app/qml/map/MMRecordingTools.qml
Original file line number Diff line number Diff line change
Expand Up @@ -110,56 +110,91 @@ Item {
lineBorderWidth: 0
}

MMHighlight {
id: handlesHighlight
Loader {
active: __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "linestring" || __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "polygon"
sourceComponent: handlesHighlightComponent
}

height: root.map.height
width: root.map.width
Loader {
active: __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "linestring" || __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "polygon"
sourceComponent: guidelineHighlightComponent
}

mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.handles, __activeLayer.vectorLayer, root.map.mapSettings )
Loader {
active: __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "linestring" || __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "polygon"
sourceComponent: midSegmentsHighlightComponent
}

lineStrokeStyle: ShapePath.DashLine
lineWidth: MMHighlight.LineWidths.Narrow
Loader {
active: __inputUtils.geometryFromLayer( __activeLayer.vectorLayer ) === "point"
sourceComponent: existingVerticesHighlightComponent
}

MMHighlight {
id: guideline
Component {
id: handlesHighlightComponent

height: root.map.height
width: root.map.width
MMHighlight {
id: handlesHighlight

lineWidth: MMHighlight.LineWidths.Narrow
lineStrokeStyle: ShapePath.DashLine
height: root.map.height
width: root.map.width

mapSettings: root.map.mapSettings
geometry: guidelineController.guidelineGeometry
mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.handles, __activeLayer.vectorLayer, root.map.mapSettings )
lineStrokeStyle: ShapePath.DashLine
lineWidth: MMHighlight.LineWidths.Narrow
}
}

MMHighlight {
id: midSegmentsHighlight
Component {
id: guidelineHighlightComponent

height: root.map.height
width: root.map.width
MMHighlight {
id: guideline

mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.midPoints, __activeLayer.vectorLayer, root.map.mapSettings )
height: root.map.height
width: root.map.width

markerType: MMHighlight.MarkerTypes.Circle
markerBorderColor: __style.grapeColor
lineWidth: MMHighlight.LineWidths.Narrow
lineStrokeStyle: ShapePath.DashLine

mapSettings: root.map.mapSettings
geometry: guidelineController.guidelineGeometry
}
}

MMHighlight {
id: existingVerticesHighlight
Component {
id: midSegmentsHighlightComponent

height: root.map.height
width: root.map.width
MMHighlight {
id: midSegmentsHighlight

mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.existingVertices, __activeLayer.vectorLayer, root.map.mapSettings )
height: root.map.height
width: root.map.width

markerType: MMHighlight.MarkerTypes.Circle
markerSize: MMHighlight.MarkerSizes.Bigger
mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.midPoints, __activeLayer.vectorLayer, root.map.mapSettings )

markerType: MMHighlight.MarkerTypes.Circle
markerBorderColor: __style.grapeColor
}
}

Component {
id: existingVerticesHighlightComponent

MMHighlight {
id: existingVerticesHighlight

height: root.map.height
width: root.map.width

mapSettings: root.map.mapSettings
geometry: __inputUtils.transformGeometryToMapWithLayer( mapTool.existingVertices, __activeLayer.vectorLayer, root.map.mapSettings )

markerType: MMHighlight.MarkerTypes.Circle
markerSize: MMHighlight.MarkerSizes.Bigger
}
}

// Duplicate position marker to be painted on the top of highlights
Expand Down

0 comments on commit a410dfa

Please sign in to comment.