Skip to content

Commit

Permalink
Modify position scope
Browse files Browse the repository at this point in the history
Format Code
  • Loading branch information
ElishaSamPeterPrabhu committed Sep 13, 2023
1 parent 144f9ca commit 2f66d0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Trimble.Modus.Components/Controls/DropDown/TMDropDown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ private async void Open()
var height = Application.Current.MainPage.Window.Height;
if (height - loc.Y < desiredHeight)
{
popup._position = Enums.ModalPosition.Top;
popup.Position = Enums.ModalPosition.Top;
border.Margin = new Thickness(0, -30, 0, 0);
#if WINDOWS
border.Margin = new Thickness(-6,4,10,0);
Expand Down
6 changes: 3 additions & 3 deletions Trimble.Modus.Components/Controls/Popup/Pages/PopupPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Trimble.Modus.Components;
public class PopupPage : ContentPage
{
#region Private fields
public Components.Enums.ModalPosition _position;
internal Components.Enums.ModalPosition Position;
private readonly View _anchorView;
private double _popupHeight = -1;
private double _popupWidth = -1;
Expand Down Expand Up @@ -125,7 +125,7 @@ public PopupPage()
public PopupPage(View anchorView, Trimble.Modus.Components.Enums.ModalPosition position)
{
_anchorView = anchorView;
_position = position;
Position = position;
SizeChanged += OnSizeChanged;
}

Expand Down Expand Up @@ -317,7 +317,7 @@ private void OnSizeChanged(object sender, EventArgs e)
double translationY = 0;
double translationX = 0;

switch (_position)
switch (Position)
{
case Components.Enums.ModalPosition.Top:
translationY = loc.Top - _popupHeight - loc.Height / 2;
Expand Down

0 comments on commit 2f66d0d

Please sign in to comment.