-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable loading images from the same webSource (#120)
* fix: enable loading images from the same webSource * refactor: separate Pixelium into 2 components * refactor: remove webSource prop in pixelium component * Merge remote-tracking branch 'origin/main' into 117-cannot-load-image-twice * refactor: remove webSource
- Loading branch information
Showing
5 changed files
with
100 additions
and
112 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import styled from '@emotion/styled'; | ||
import { memo, useRef } from 'react'; | ||
import { SplitPane, Toolbar } from 'react-science/ui'; | ||
|
||
import CenterPanel from './layout/CenterPanel'; | ||
import Header from './layout/Header'; | ||
import Sidebar from './layout/Sidebar'; | ||
import ModalContainer from './modal/ModalContainer'; | ||
import ExportTool from './tool/ExportTool'; | ||
import GreyTool from './tool/FilterTool'; | ||
import GeometryTool from './tool/GeometryTool'; | ||
import ImportTool from './tool/ImportTool'; | ||
import MaskTool from './tool/MaskTool'; | ||
import MorphologyTool from './tool/MorphologyTool'; | ||
import ROITool from './tool/ROITool'; | ||
|
||
const PixeliumStyle = styled.div` | ||
width: 100%; | ||
height: 100%; | ||
background-color: white; | ||
display: flex; | ||
flex-direction: column; | ||
`; | ||
|
||
const PixeliumMainStyle = styled.div` | ||
display: flex; | ||
flex-direction: row; | ||
height: 100%; | ||
overflow: hidden; | ||
`; | ||
|
||
function PixeliumApp() { | ||
// Refs | ||
const rootRef = useRef<HTMLDivElement>(null); | ||
|
||
return ( | ||
<PixeliumStyle ref={rootRef}> | ||
<Header /> | ||
<PixeliumMainStyle> | ||
<Toolbar vertical> | ||
<ImportTool /> | ||
<ExportTool /> | ||
<GreyTool /> | ||
<MaskTool /> | ||
<MorphologyTool /> | ||
<GeometryTool /> | ||
<ROITool /> | ||
<ModalContainer /> | ||
</Toolbar> | ||
<SplitPane direction="horizontal" size="300px" controlledSide="end"> | ||
<CenterPanel /> | ||
<Sidebar /> | ||
</SplitPane> | ||
</PixeliumMainStyle> | ||
</PixeliumStyle> | ||
); | ||
} | ||
|
||
export default memo(PixeliumApp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters