You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
void EditorBaseControl::OnPointerPressed(DUX::Input::PointerRoutedEventArgs const &e)
{
__super::OnPointerPressed(e);
Focus(FocusState::Pointer);
// The focus state seems to get confused if the following code is placed in ImageTarget_PointerPressed.
// OnPointerReleased is the same for symmetry. ImageTarget_PointerMoved is there to show correct cursor
// when moving the cursor over the scrollbar (UWP).
if (auto imageTarget{ GetTemplateChild(L"ImageTarget").try_as<UIElement>() }) // Todo: Store this
{
auto point{ e.GetCurrentPoint(imageTarget) };
auto scaled{ point.Position() };
switch (point.Properties().PointerUpdateKind())
{
case DUI::PointerUpdateKind::LeftButtonPressed:
_scintilla->PointerPressed(Point{ scaled.X * _dpiScale, scaled.Y * _dpiScale }, point.Timestamp() / 1000ul, e.KeyModifiers());
break;
case DUI::PointerUpdateKind::RightButtonPressed:
_scintilla->RightPointerPressed(Point{ scaled.X * _dpiScale, scaled.Y * _dpiScale }, point.Timestamp() / 1000ul, e.KeyModifiers());
break;
}
// Todo: make sure the loss of precision is not going to realistically cause a problem
}
e.Handled(true);
}
The text was updated successfully, but these errors were encountered:
by adding
e.Handled(true);
The text was updated successfully, but these errors were encountered: