7import QGroundControl.Controls
8import QGroundControl.FlightMap
10/// Corridor Scan Complex Mission Item visuals
11TransectStyleMapVisuals {
13 polygonInteractive: false
14 hideMapPolygon: mapPolylineVisuals.dragging
15 // The area polygon joins holes to its outer boundary with zero-width bridges, so its outline is drawn
16 // from the corridor boundaries instead to keep the bridges hidden.
19 property bool _currentItem: object.isCurrentItem
21 function _updateBoundaryLines() {
22 boundaryLineObjects.destroyObjects()
23 const boundaries = object.corridorBoundaries
24 for (let i = 0; i < boundaries.length; i++) {
25 boundaryLineObjects.addObject(boundaryLineComponent.createObject(map, { path: boundaries[i] }), map)
29 Component.onCompleted: _updateBoundaryLines()
33 function onCorridorBoundariesChanged() { corridorVisuals._updateBoundaryLines() }
36 QGCDynamicObjectManager {
37 id: boundaryLineObjects
41 id: boundaryLineComponent
46 visible: !corridorVisuals.hideMapPolygon
47 opacity: corridorVisuals.opacity
51 QGCMapPolylineVisuals {
52 id: mapPolylineVisuals
54 mapPolyline: object.corridorPolyline
55 interactive: _currentItem && parent.interactive
57 lineColor: QGroundControl.globalPalette.mapMissionTrajectory
59 opacity: parent.opacity