feat(grid): remove viewportIndex and only rely on viewportId (#3591)

Co-authored-by: Bill Wallace <wayfarer3130@gmail.com>
This commit is contained in:
AlirezaandBill Wallace authored and GitHub committed 2023-08-30 16:46:55 -04:00
1 parent 5dafac7c92
commit 4c6ff873e8
83 files changed
+1309 -1123

No files matched your search

+5 -5
View File
@@ -52,7 +52,7 @@ export default {
*
* @param props {*}
* @param props.displaySets
* @param props.viewportIndex
* @param props.viewportId
* @param props.viewportLabel
* @param props.dataSource
* @param props.viewportOptions
@@ -63,16 +63,16 @@ export default {
const { viewportOptions } = props;
const [viewportGrid, viewportGridService] = useViewportGrid();
const { viewports, activeViewportIndex } = viewportGrid;
const { activeViewportId } = viewportGrid;
return (
<MicroscopyViewport
servicesManager={servicesManager}
extensionManager={extensionManager}
commandsManager={commandsManager}
activeViewportIndex={activeViewportIndex}
setViewportActive={(viewportIndex: number) => {
viewportGridService.setActiveViewportIndex(viewportIndex);
activeViewportId={activeViewportId}
setViewportActive={(viewportId: string) => {
viewportGridService.setActiveViewportId(viewportId);
}}
viewportData={viewportOptions}
{...props}