-
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.
feat(imjoy-api): create service, move dispatchSpawn to render
- Loading branch information
Showing
25 changed files
with
380 additions
and
215 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { LitElement, css, html } from 'lit'; | ||
import { customElement } from 'lit/decorators.js'; | ||
import { Ref, createRef, ref } from 'lit/directives/ref.js'; | ||
import { ItkViewer } from './itk-viewer-element.js'; | ||
import './itk-viewport.js'; | ||
import './itk-view-3d.js'; | ||
import './itk-view-3d-vtkjs.js'; | ||
|
||
@customElement('itk-viewer-3d') | ||
export class ItkViewer3d extends LitElement { | ||
viewer: Ref<ItkViewer> = createRef(); | ||
|
||
getActor() { | ||
return this.viewer.value?.getActor(); | ||
} | ||
|
||
render() { | ||
return html` | ||
<itk-viewer class="fill" ${ref(this.viewer)}> | ||
<itk-viewport class="fill"> | ||
<itk-view-3d class="fill"> | ||
<itk-view-3d-vtkjs></itk-view-3d-vtkjs> | ||
</itk-view-3d> | ||
</itk-viewport> | ||
</itk-viewer> | ||
`; | ||
} | ||
|
||
static styles = css` | ||
:host { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.fill { | ||
flex: 1; | ||
min-height: 0; | ||
overflow: hidden; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
`; | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
'itk-viewer-3d': ItkViewer3d; | ||
} | ||
} |
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
Oops, something went wrong.