Skip to content

Commit

Permalink
Removed drag to select and fixed cursor change on hover for details pane
Browse files Browse the repository at this point in the history
  • Loading branch information
jschick04 authored and bill-long committed May 28, 2024
1 parent 33241b5 commit 4913784
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/EventLogExpert/Components/DetailsPane.razor
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<hr />

<div class="details-row-xml" @onclick="ToggleXml">
<div>XML:</div>
<div>XML</div>
<div class="justify-self-center">
<button class="button" @onclick="CopyEvent">Copy Event</button>
</div>
Expand Down
7 changes: 7 additions & 0 deletions src/EventLogExpert/Components/DetailsPane.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
cursor: n-resize;
}

#details-header {
user-select: none;
cursor: pointer;
}

.details-group { display: contents; }

.details-group[data-toggle="true"] { display: none; }
Expand All @@ -47,6 +52,8 @@
.details-row-xml {
display: grid;
grid-template-columns: repeat(3, 1fr);
user-select: none;
cursor: pointer;

& .button-primary { width: 6rem; }
}
Expand Down
3 changes: 1 addition & 2 deletions src/EventLogExpert/Components/EventTable.razor
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@
@if (_currentTable is not null)
{
<Virtualize Context="evt" Items="_currentTable.DisplayedEvents">
<tr class="@GetCss(evt)" @key="@($"{evt.OwningLog}_{evt.RecordId}")"
@onmouseenter="args => DragSelectEvent(args, evt)" @onmousedown="args => SelectEvent(args, evt)" tabindex="0">
<tr class="@GetCss(evt)" @key="@($"{evt.OwningLog}_{evt.RecordId}")" @onmousedown="args => SelectEvent(args, evt)" tabindex="0">
@foreach ((ColumnName column, bool _) in _eventTableState.Columns.Where(column => column.Value))
{
<td>
Expand Down
8 changes: 0 additions & 8 deletions src/EventLogExpert/Components/EventTable.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ private static string GetLevelClass(string level) =>
_ => string.Empty,
};

private void DragSelectEvent(MouseEventArgs args, DisplayEventModel @event)
{
if (args.Buttons == 1)
{
Dispatcher.Dispatch(new EventLogAction.SelectEvent(@event, IsMultiSelect: true, ShouldStaySelected: !args.CtrlKey));
}
}

private string GetCss(DisplayEventModel @event) =>
_selectedEventState.Contains(@event) ? "table-row selected" : $"table-row {GetHighlightedColor(@event)}";

Expand Down

0 comments on commit 4913784

Please sign in to comment.