diff --git a/src/Asv.Drones.Api/Core/Controls/FlightWidget/FlightWidgetViewModel.cs b/src/Asv.Drones.Api/Core/Controls/FlightWidget/FlightWidgetViewModel.cs
index 83412660..da6c6c88 100644
--- a/src/Asv.Drones.Api/Core/Controls/FlightWidget/FlightWidgetViewModel.cs
+++ b/src/Asv.Drones.Api/Core/Controls/FlightWidget/FlightWidgetViewModel.cs
@@ -31,6 +31,17 @@ protected FlightWidgetViewModel(NavId id, IExtensionService ext)
Disposable.AddAction(() => Sections.ClearWithItemsDispose());
SectionsView = Sections.ToNotifyCollectionChangedSlim().DisposeItWith(Disposable);
+
+ Layout
+ .Register(
+ nameof(IsExpanded),
+ value => IsExpanded = value,
+ () => IsExpanded,
+ this.ObservePropertyChanged(x => x.IsExpanded).Skip(1)
+ )
+ .DisposeItWith(Disposable);
+
+ Layout.LoadWhenRootAttached(RootTracking).AddTo(ref DisposableBag);
}
public MaterialIconKind? Icon
diff --git a/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageView.axaml b/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageView.axaml
index d225f437..c3cc622e 100644
--- a/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageView.axaml
+++ b/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageView.axaml
@@ -17,7 +17,7 @@
-
+
@@ -43,6 +43,7 @@
HorizontalAlignment="Right"
VerticalAlignment="Bottom"
Margin="8"
+ GestureSurface="{Binding #PART_Map}"
TouchpadRotationSensitivity="1"
/>
diff --git a/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageViewModel.cs b/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageViewModel.cs
index c0d84b41..6c0cfcc8 100644
--- a/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageViewModel.cs
+++ b/src/Asv.Drones/Shell/Pages/FlightMode/FlightModePageViewModel.cs
@@ -1,4 +1,3 @@
-using System.Collections.Generic;
using Asv.Avalonia;
using Asv.Avalonia.GeoMap;
using Asv.Common;
@@ -73,9 +72,20 @@ protected override void AfterLoadExtensions()
nameof(Map.CenterMap),
x => Map.CenterMap.Value = x,
() => Map.CenterMap.Value,
- Map.CenterMap
+ Map.CenterMap.Skip(1)
+ );
+ Layout.Register(
+ nameof(Map.Zoom),
+ x => Map.Zoom.Value = x,
+ () => Map.Zoom.Value,
+ Map.Zoom.Skip(1)
+ );
+ Layout.Register(
+ nameof(Map.Rotation),
+ x => Map.Rotation.Value = x,
+ () => Map.Rotation.Value,
+ Map.Rotation.Skip(1)
);
- Layout.Register(nameof(Map.Zoom), x => Map.Zoom.Value = x, () => Map.Zoom.Value, Map.Zoom);
Layout.LoadWhenRootAttached(RootTracking).AddTo(ref DisposableBag);
}
}