Skip to content

Commit

Permalink
Merge pull request #331 from Smithsonian/dev-regression-fix
Browse files Browse the repository at this point in the history
Dev regression fix
  • Loading branch information
gjcope authored Nov 26, 2024
2 parents 717bcaa + cf01078 commit 5728312
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 3 additions & 2 deletions source/client/applications/StoryApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions source/client/components/CVStoryApplication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion source/client/ui/story/ExplorerPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

////////////////////////////////////////////////////////////////////////////////

Expand All @@ -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);
Expand Down

0 comments on commit 5728312

Please sign in to comment.