diff --git a/package.json b/package.json index fff5055d..6d51fc86 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "voyager", - "version": "0.45.0", + "version": "0.46.1", "description": "Smithsonian DPO Voyager - 3D Explorer and Tool Suite", "scripts": { "start": "npm run server", diff --git a/source/client/applications/StoryApplication.ts b/source/client/applications/StoryApplication.ts index 476654d8..d83327ba 100644 --- a/source/client/applications/StoryApplication.ts +++ b/source/client/applications/StoryApplication.ts @@ -156,8 +156,8 @@ export default class StoryApplication revisedUrl.searchParams.delete("root"); revisedUrl.searchParams.delete("document"); window.history.replaceState(null,null,revisedUrl); - props.root = null; - props.document = null; + this.explorer.props.root = null; + this.explorer.props.document = null; } this.explorer.evaluateProps(); @@ -188,6 +188,7 @@ export default class StoryApplication this.assetManager.ins.baseUrlValid.setValue(true); } + app.dragdrop = props.dragdrop; const tasks = this.system.getMainComponent(CVTaskProvider); tasks.ins.mode.setValue(mode); } diff --git a/source/client/components/CVStoryApplication.ts b/source/client/components/CVStoryApplication.ts index 4d96b160..652ba772 100644 --- a/source/client/components/CVStoryApplication.ts +++ b/source/client/components/CVStoryApplication.ts @@ -51,6 +51,7 @@ export default class CVStoryApplication extends Component ins = this.addInputs(CVStoryApplication.ins); referrer: string = ""; + dragdrop: boolean = false; protected get taskProvider() { return this.getMainComponent(CVTaskProvider); diff --git a/source/client/ui/story/ExplorerPanel.ts b/source/client/ui/story/ExplorerPanel.ts index f6b5cb02..f3ad3666 100644 --- a/source/client/ui/story/ExplorerPanel.ts +++ b/source/client/ui/story/ExplorerPanel.ts @@ -24,6 +24,7 @@ import { relative } from "path"; import { IStoryApplicationProps } from "client/applications/StoryApplication"; import { SimpleDropzone } from 'simple-dropzone'; import CVMediaManager from "client/components/CVMediaManager"; +import CVStoryApplication from "client/components/CVStoryApplication"; //////////////////////////////////////////////////////////////////////////////// @@ -37,8 +38,9 @@ export default class ExplorerPanel extends CustomElement { super(); this.application = application; + const storyApp: CVStoryApplication = application.system.getComponent(CVStoryApplication); - if((application.props as IStoryApplicationProps).dragdrop === true) { + if(storyApp && storyApp.dragdrop === true) { this.addEventListener('dragenter', this.onDragEnter); this.addEventListener('dragleave', this.onDragLeave); this.addEventListener('drop', this.onDragDrop);