-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Ronen <[email protected]>
- Loading branch information
Showing
131 changed files
with
958 additions
and
564 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,5 @@ | ||
export function fetchDeepZoomImageFailed() { | ||
return { | ||
type: "fetchDeepZoomImageFailed", | ||
}; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { spatialEmbeddingKeyword } from "../globals"; | ||
import { RootState } from "../reducers"; | ||
import { selectIsDeepZoomSourceValid, selectS3URI } from "../selectors/config"; | ||
import { getFeatureFlag } from "../util/featureFlags/featureFlags"; | ||
import { FEATURES } from "../util/featureFlags/features"; | ||
|
||
export function isSpatialMode(props: Partial<RootState>) { | ||
const { layoutChoice } = props; | ||
|
||
return layoutChoice?.current?.includes(spatialEmbeddingKeyword); | ||
} | ||
|
||
const isSpatial = getFeatureFlag(FEATURES.SPATIAL); | ||
|
||
/** | ||
* (thuang): Selector to determine if the OpenSeadragon viewer should be shown | ||
*/ | ||
export function shouldShowOpenseadragon(props: Partial<RootState>) { | ||
return ( | ||
isSpatial && | ||
selectIsDeepZoomSourceValid(props) && | ||
selectS3URI(props) && | ||
isSpatialMode(props) | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { CSSProperties } from "react"; | ||
|
||
/** | ||
* (thuang): Copied from the style of the graph-canvas element | ||
* to ensure both openseadragon and the canvas are resizable | ||
*/ | ||
export const COMMON_CANVAS_STYLE: CSSProperties = { | ||
position: "absolute", | ||
top: 0, | ||
left: 0, | ||
padding: 0, | ||
margin: 0, | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.