Skip to content

Commit bd5bd55

Browse files
committed
Linting
1 parent 457f48e commit bd5bd55

5 files changed

Lines changed: 29 additions & 34 deletions

File tree

bun.lock

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"typescript": "^4.7.4"
103103
},
104104
"overrides": {
105+
"@types/minimatch": "5.1.2",
105106
"@deck.gl/core": "9.1.15",
106107
"@deck.gl/extensions": "9.1.15",
107108
"@deck.gl/geo-layers": "9.1.15",

src/components/CaseViewer.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,7 @@ function ParametrizedSlideViewer({
218218
}
219219
}) => {
220220
setVivAnnotationGroupStyles((prev) => {
221-
const base =
222-
prev[uid] ??
221+
const base = prev[uid] ??
223222
vivBulkCatalog?.defaultStylesByGroupUID[uid] ?? {
224223
opacity: 1,
225224
color: [220, 60, 60],
@@ -399,7 +398,9 @@ function ParametrizedSlideViewer({
399398
onAnnotationGroupVisibilityChange={
400399
handleVivAnnotationGroupVisibilityChange
401400
}
402-
onAnnotationGroupStyleChange={handleVivAnnotationGroupStyleChange}
401+
onAnnotationGroupStyleChange={
402+
handleVivAnnotationGroupStyleChange
403+
}
403404
/>
404405
) : null}
405406
</>
@@ -445,7 +446,8 @@ function ParametrizedSlideViewer({
445446
<p style={{ fontSize: 11, lineHeight: 1.45, margin: 0 }}>
446447
No bulk annotation groups for this slide were returned (or all
447448
were skipped). Filter the console with{' '}
448-
<code style={{ fontSize: 10 }}>[Viv bulk ANN]</code> to see why.
449+
<code style={{ fontSize: 10 }}>[Viv bulk ANN]</code> to see
450+
why.
449451
</p>
450452
</div>
451453
) : (

src/viv/VivSlideViewport.tsx

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { Layer } from '@deck.gl/core'
22
import { OrthographicView } from '@deck.gl/core'
3+
import type { PathLayer, ScatterplotLayer } from '@deck.gl/layers'
34
import DeckGL from '@deck.gl/react'
4-
import { PathLayer, ScatterplotLayer } from '@deck.gl/layers'
55
import { MultiscaleImageLayer } from '@vivjs/layers'
66
import { message, Spin } from 'antd'
77
import type React from 'react'
@@ -10,9 +10,9 @@ import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react'
1010
import type { VivSettings } from '../AppConfig'
1111
import type DicomWebManager from '../DicomWebManager'
1212
import {
13+
type BulkAnnotationGeometryContext,
1314
DicomLoader,
1415
isVivDicomTileNetworkCancellation,
15-
type BulkAnnotationGeometryContext,
1616
} from './dicomLoader'
1717
import {
1818
hydrateVivBulkGroupLayerSlice,
@@ -62,15 +62,12 @@ function buildStyledBulkOverlayLayers(
6262
if (slice == null) {
6363
continue
6464
}
65-
const st =
66-
styles[uid] ??
65+
const st = styles[uid] ??
6766
defaultStyles[uid] ?? {
6867
opacity: 1,
6968
color: [220, 60, 60],
7069
}
71-
const a = Math.round(
72-
Math.max(0, Math.min(1, st.opacity)) * 220,
73-
)
70+
const a = Math.round(Math.max(0, Math.min(1, st.opacity)) * 220)
7471
const rgba: [number, number, number, number] = [
7572
st.color[0] ?? 0,
7673
st.color[1] ?? 0,
@@ -469,12 +466,7 @@ const VivSlideViewport: React.FC<VivSlideViewportProps> = ({
469466
})
470467
})
471468
}
472-
}, [
473-
loadBulkAnnotations,
474-
baseLayer,
475-
visibleBulkAnnotationGroupUIDs,
476-
client,
477-
])
469+
}, [loadBulkAnnotations, baseLayer, visibleBulkAnnotationGroupUIDs, client])
478470

479471
const sp = slideRef.current
480472
const orthoZoomClamp =

src/viv/loadBulkAnnotationLayers.ts

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,7 @@ export type VivBulkAnnotationCatalogPayload = {
6767
string,
6868
dmvNamespace.metadata.MicroscopyBulkSimpleAnnotations
6969
>
70-
defaultStylesByGroupUID: Record<
71-
string,
72-
{ opacity: number; color: number[] }
73-
>
70+
defaultStylesByGroupUID: Record<string, { opacity: number; color: number[] }>
7471
}
7572

7673
/** Deferred work: fetch bulk pixel data + build deck layers when a group is toggled visible (OpenLayers parity). */
@@ -93,9 +90,10 @@ export type VivBulkGroupGeometryJob = {
9390
commonZCoordinate: number
9491
}
9592

96-
export type VivBulkAnnotationMetadataResult = VivBulkAnnotationCatalogPayload & {
97-
groupGeometryJobs: Record<string, VivBulkGroupGeometryJob>
98-
}
93+
export type VivBulkAnnotationMetadataResult =
94+
VivBulkAnnotationCatalogPayload & {
95+
groupGeometryJobs: Record<string, VivBulkGroupGeometryJob>
96+
}
9997

10098
function emptyMetadataResult(): VivBulkAnnotationMetadataResult {
10199
return {
@@ -179,8 +177,8 @@ export async function hydrateVivBulkGroupLayerSlice(options: {
179177

180178
let features: unknown[]
181179
try {
182-
features =
183-
resolveBulkSimpleAnnotationsApi().getFeaturesFromBulkAnnotations({
180+
features = resolveBulkSimpleAnnotationsApi().getFeaturesFromBulkAnnotations(
181+
{
184182
graphicType,
185183
graphicData,
186184
graphicIndex,
@@ -196,7 +194,8 @@ export async function hydrateVivBulkGroupLayerSlice(options: {
196194
view: viewMock,
197195
featureFunction: featureFn,
198196
isHighResolution: () => false,
199-
})
197+
},
198+
)
200199
} catch (e) {
201200
console.warn(
202201
`${VIV_BULK} getFeaturesFromBulkAnnotations failed`,
@@ -516,8 +515,12 @@ export async function loadBulkAnnotationMetadataAndJobs(options: {
516515
/** Present for API parity with the classic path; bulk byte fetch happens lazily per group. */
517516
fetchClient: DicomWebManager
518517
}): Promise<VivBulkAnnotationMetadataResult> {
519-
const { geometry, studyInstanceUID, imageSeriesInstanceUID, annotationClient } =
520-
options
518+
const {
519+
geometry,
520+
studyInstanceUID,
521+
imageSeriesInstanceUID,
522+
annotationClient,
523+
} = options
521524

522525
const { pyramid, extent } = geometry
523526
const refImage = pyramid[0]

0 commit comments

Comments
 (0)