Minor cleanup

This commit is contained in:
Mike Tasset
2024-11-14 07:11:59 +00:00
parent 730540de07
commit 47e86e2996
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -40,14 +40,14 @@ const { categorize, isolate, animate, resetFilters } = useViewer()
const levels = ref()
// Get all the properties with the key 'properties.Instance Parameters.Constraints.Level.value'
const getLevels = async () => {
const getLevels = () => {
if (!properties) return
levels.value = properties.find((property: PropertyInfo) => property.key === 'properties.Instance Parameters.Constraints.Level.value')
}
// Categorize the levels and isolate the objects
const categorizeLevels = async () => {
await getLevels()
getLevels()
categorize(levels.value.valueGroups)
isolate(levels.value.valueGroups.flatMap((group: StringPropertyInfo['valueGroups']) => group.ids))
animate()
+2 -2
View File
@@ -23,7 +23,7 @@ export default function useViewer() {
* Initialize the viewer
* @param element - DOM element to initialize the viewer on
*/
async function init(element: HTMLDivElement) {
const init = async (element: HTMLDivElement) => {
const params = {
...DefaultViewerParams,
showStats: false,
@@ -57,7 +57,7 @@ export default function useViewer() {
* The viewer can be extended with additional functionality by adding extensions
* You can use extensions provided by the viewer, or create your own
*/
function addExtensions() {
const addExtensions = () => {
if (!viewer) return
viewer.createExtension(CameraController)
viewer.createExtension(SelectionExtension)