refactor(ui): Migrate components to ui-next (#4930)

Co-authored-by: Dan Rukas <dan.rukas@gmail.com>
This commit is contained in:
AlirezaandDan Rukas authored and GitHub committed 2025-04-08 12:06:07 -04:00
1 parent 1b8729dded
commit 2bdf4afa4d
80 files changed
+2196 -521

No files matched your search

@@ -4,7 +4,7 @@ import * as cs3DTools from '@cornerstonejs/tools';
import { Enums, eventTarget, getEnabledElement } from '@cornerstonejs/core';
import { MeasurementService } from '@ohif/core';
import { AllInOneMenu } from '@ohif/ui-next';
import { useViewportDialog } from '@ohif/ui';
import { useViewportDialog } from '@ohif/ui-next';
import type { Types as csTypes } from '@cornerstonejs/core';
import { setEnabledElement } from '../state';
@@ -103,7 +103,8 @@ export function Colorbar({
return (
<div
className="hover:bg-accent flex h-8 w-full flex-shrink-0 cursor-pointer items-center px-2 text-base hover:rounded"
onClick={() => {
onClick={e => {
e.stopPropagation();
onSetColorbar();
}}
>
@@ -112,7 +113,8 @@ export function Colorbar({
<Switch
className="ml-2 flex-shrink-0"
checked={showColorbar}
onCheckedChange={() => {
onClick={e => {
e.stopPropagation();
onSetColorbar();
}}
/>
@@ -360,6 +360,10 @@ const connectMeasurementServiceToTools = (
measurementService.subscribe(
MEASUREMENT_UPDATED,
({ source, measurement, notYetUpdatedAtSource }) => {
if (!source) {
return;
}
if (source.name !== CORNERSTONE_3D_TOOLS_SOURCE_NAME) {
return;
}