open-plant 1.2.17 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1995 -1650
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/react/draw-layer.d.ts +40 -1
- package/dist/types/react/draw-layer.d.ts.map +1 -1
- package/dist/types/react/wsi-viewer-canvas.d.ts +9 -3
- package/dist/types/react/wsi-viewer-canvas.d.ts.map +1 -1
- package/dist/types/wsi/wsi-tile-renderer.d.ts +29 -5
- package/dist/types/wsi/wsi-tile-renderer.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -137,6 +137,9 @@ import { WsiViewerCanvas } from "open-plant";
|
|
|
137
137
|
imageColorSettings={{ brightness: 0, contrast: 0, saturation: 0 }}
|
|
138
138
|
ctrlDragRotate
|
|
139
139
|
rotationResetNonce={rotationResetNonce}
|
|
140
|
+
minZoom={0.25}
|
|
141
|
+
maxZoom={4}
|
|
142
|
+
viewTransition={{ duration: 300 }}
|
|
140
143
|
authToken={bearerToken}
|
|
141
144
|
pointData={pointPayload}
|
|
142
145
|
pointPalette={termPalette.colors}
|
|
@@ -153,6 +156,15 @@ import { WsiViewerCanvas } from "open-plant";
|
|
|
153
156
|
drawFillColor="transparent"
|
|
154
157
|
activeRegionId={selectedRoiId} // controlled: 외부에서 active ROI 제어
|
|
155
158
|
onActiveRegionChange={setSelectedRoiId} // 내부 클릭/탭 선택 변경 알림
|
|
159
|
+
resolveRegionLabelStyle={({ zoom }) => ({
|
|
160
|
+
offsetY: zoom > 4 ? -20 : -10,
|
|
161
|
+
})}
|
|
162
|
+
autoLiftRegionLabelAtMaxZoom
|
|
163
|
+
drawAreaTooltip={{
|
|
164
|
+
enabled: true,
|
|
165
|
+
cursorOffset: { x: 16, y: -24 },
|
|
166
|
+
format: (areaMm2) => `${areaMm2.toFixed(3)} mm²`,
|
|
167
|
+
}}
|
|
156
168
|
brushOptions={{
|
|
157
169
|
radius: 32, // HTML/CSS px (zoom이 바뀌어도 화면에서 고정)
|
|
158
170
|
edgeDetail: 1.6, // 값이 클수록 더 둥글고 섬세한 브러시 경계
|
|
@@ -197,6 +209,11 @@ import { WsiViewerCanvas } from "open-plant";
|
|
|
197
209
|
`brushOptions.radius`는 world 좌표가 아니라 HTML/CSS px 단위이며, 줌 변화와 무관하게 on-screen 크기가 고정됩니다.
|
|
198
210
|
`drawFillColor`는 freehand/rectangle/circular draw preview 내부 채움 색을 제어합니다. 미지정 시 기본값은 `transparent`입니다.
|
|
199
211
|
`activeRegionId`를 전달하면 controlled mode로 동작하며 내부 state 대신 prop 값을 active ROI로 사용합니다. `activeRegionId`를 생략하면 기존처럼 uncontrolled mode(내부 state)로 동작합니다.
|
|
212
|
+
`minZoom`/`maxZoom`으로 뷰어 zoom 범위를 지정할 수 있으며, 휠 줌/더블클릭 줌/`setViewState`/`fitToImage` 모두 동일하게 clamp됩니다.
|
|
213
|
+
`viewTransition`을 지정하면 `viewState` 반영, `fitToImage`, `zoomBy` 전환에 애니메이션이 적용됩니다.
|
|
214
|
+
`resolveRegionLabelStyle`로 zoom/region context 기반 nametag 스타일(예: `offsetY`)을 동적으로 계산할 수 있습니다.
|
|
215
|
+
`autoLiftRegionLabelAtMaxZoom`을 `true`로 주면 `maxZoom`에 도달하는 순간 nametag가 위로 `20px` 부드럽게 올라가고, `maxZoom`에서 벗어나면 다시 부드럽게 내려옵니다.
|
|
216
|
+
`drawAreaTooltip`을 켜면 freehand/rectangle/circular 드로잉 중 커서 근처에 실시간 면적(mm²) tooltip을 표시합니다.
|
|
200
217
|
`imageColorSettings`는 이미지 타일에만 적용되며, cell marker/ROI/draw overlay에는 영향을 주지 않습니다.
|
|
201
218
|
`pointData.fillModes`(선택, `Uint8Array`)를 주면 포인트별 렌더 모드를 제어할 수 있습니다. `0`은 ring(stroked), `1`은 solid(fill)이며 `0`이 아닌 값은 solid로 처리됩니다.
|
|
202
219
|
`roiRegions[].coordinates`는 단일 링뿐 아니라 hole이 포함된 Polygon(`[[outer],[hole1], ...]`)과 MultiPolygon(`[[[...]], [[...]], ...]`)도 지원합니다.
|