Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenthoms committed May 8, 2024
1 parent 140b338 commit c5e9dd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";

import { IntersectionReferenceSystem, Trajectory } from "@equinor/esv-intersection";
import { IntersectionReferenceSystem, SurfaceLine, Trajectory } from "@equinor/esv-intersection";
import { ModuleViewProps } from "@framework/Module";
import { useViewStatusWriter } from "@framework/StatusWriter";
import { useElementSize } from "@lib/hooks/useElementSize";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ export function ReadoutBox(props: ReadoutBoxProps): React.ReactNode {
return null;
}

const sortedReadoutItems = props.readoutItems.sort((a, b) => {
return b.layer.order - a.layer.order;
});

return (
<div className="absolute rounded border-2 border-neutral-300 bottom-10 right-20 bg-white bg-opacity-75 p-2 flex flex-col gap-2 text-sm z-50 w-60 pointer-events-none">
{props.readoutItems.map((item, index) => {
{sortedReadoutItems.map((item, index) => {
if (index < (props.maxNumItems ?? 3)) {
return (
<div key={index} className="flex items-center gap-2">
Expand Down

0 comments on commit c5e9dd3

Please sign in to comment.