Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions client/components/BaseApp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ startDate.setUTCHours(0, 0, 0, 0);
* @param {Object.<string, number[]>} [props.surfaceShadingConfig.gradientSetting] Mapping of proerties to corresponding gradient bar color stop values.
* @param {Object} [props.propertyIconMap] A mapping of property names to image paths used for each {@link DeviceStats} object.
* @param {number} [props.geomIndex] Index of geometry to load in scene.
* @param {Object.<string, Object>} [props.extensions] Object with keys representing the IDs of viewer extensions that should be loaded, and values representing any options the extension may require.
* @memberof Autodesk.DataVisualization.UI
* @alias Autodesk.DataVisualization.UI.BaseApp
*/
Expand Down Expand Up @@ -1211,6 +1212,9 @@ export default function BaseApp(props) {
}
}, [currAppState.masterDataView]);

const extensions = props.extensions || {};
extensions["Autodesk.Viewing.ZoomWindow"] ||= {};
extensions["Autodesk.DataVisualization"] ||= {};
return (
<React.Fragment>
<div id="main_header">
Expand Down Expand Up @@ -1241,10 +1245,7 @@ export default function BaseApp(props) {
onViewerInitialized={onViewerInitialized}
onModelLoaded={onModelLoaded}
getToken={getToken}
extensions={{
"Autodesk.Viewing.ZoomWindow": {},
"Autodesk.DataVisualization": {},
}}
extensions={extensions}
geomIndex={props.geomIndex}
/>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/components/Viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import React, { useEffect, useRef } from "react";
* @param {string} props.docUrn Document URN of model
* @param {OnModelLoaded} [props.onModelLoaded] Callback function invoked when the model has loaded
* @param {OnViewerInitialized} [props.onViewerInitialized] Callback function invoked when LMV has been intialized
* @param {string[]} [props.extensions] List of extension ids forwarded to viewer config to load.
* @param {Object.<string, Object>} [props.extensions] Object with keys representing the IDs of viewer extensions that should be loaded, and values representing any options the extension may require.
* @param {Object.<string, Object>} [props.disabledExtensions] Default extensions to prevent being loaded.
* @param {string} [props.phaseName] phaseName of view to load in scene.
* @param {string} [props.guid] guid of BubbleNode to load in scene.
Expand Down