Update embedded viewer docs
This commit is contained in:
parent
e5369b995a
commit
b6fedc434a
@ -44,7 +44,6 @@ include tags. Here's how it works:
|
|||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<ol start="2">
|
<ol start="2">
|
||||||
<li>the HTML <code>base</code> tag</li>
|
|
||||||
<li>The <a href="">WADO Image Loader Codecs and Web Worker source code</a>
|
<li>The <a href="">WADO Image Loader Codecs and Web Worker source code</a>
|
||||||
should be accessible from your server's root</li>
|
should be accessible from your server's root</li>
|
||||||
<li>Create a JS Object to hold the OHIF Viewer's configuration. Here are some
|
<li>Create a JS Object to hold the OHIF Viewer's configuration. Here are some
|
||||||
@ -52,10 +51,12 @@ include tags. Here's how it works:
|
|||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var props = {
|
// Set before importing `ohif-viewer`
|
||||||
// Directory your application runs in (e.g. /viewer/)
|
window.config = {
|
||||||
|
// default: '/'
|
||||||
routerBasename: '/',
|
routerBasename: '/',
|
||||||
rootUrl: 'https://lrjoo3znxm.codesandbox.io',
|
// default: ''
|
||||||
|
relativeWebWorkerScriptsPath: '',
|
||||||
servers: {
|
servers: {
|
||||||
dicomWeb: [
|
dicomWeb: [
|
||||||
{
|
{
|
||||||
@ -82,7 +83,7 @@ var props = {
|
|||||||
```js
|
```js
|
||||||
// Made available by the `ohif-viewer` script included in step 1
|
// Made available by the `ohif-viewer` script included in step 1
|
||||||
var Viewer = window.OHIFStandaloneViewer.App
|
var Viewer = window.OHIFStandaloneViewer.App
|
||||||
var app = React.createElement(Viewer, props, null)
|
var app = React.createElement(Viewer, window.config, null)
|
||||||
|
|
||||||
ReactDOM.render(app, document.getElementById('ohif-viewer-target'))
|
ReactDOM.render(app, document.getElementById('ohif-viewer-target'))
|
||||||
```
|
```
|
||||||
@ -92,9 +93,9 @@ ReactDOM.render(app, document.getElementById('ohif-viewer-target'))
|
|||||||
> I'm having trouble getting this to work. Where can I go for help?
|
> I'm having trouble getting this to work. Where can I go for help?
|
||||||
|
|
||||||
First, check out this fully functional
|
First, check out this fully functional
|
||||||
[CodeSandbox](https://codesandbox.io/s/lrjoo3znxm) example. If you're still
|
[CodeSandbox](https://codesandbox.io/s/ohif-viewer-script-tag-usage-b3st9)
|
||||||
having trouble, feel free to search or GitHub issues. Can't find anything
|
example. If you're still having trouble, feel free to search or GitHub issues.
|
||||||
related your problem? Create a new one.
|
Can't find anything related your problem? Create a new one.
|
||||||
|
|
||||||
> When I include bootstrap, other styles on my page no longer work correctly.
|
> When I include bootstrap, other styles on my page no longer work correctly.
|
||||||
> What can I do?
|
> What can I do?
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user