Use shortened model name in scene explorer
This commit is contained in:
Родитель
bb63350631
Коммит
b86e1d8577
|
@ -183,8 +183,17 @@ const isAtomic = computed(() => props.treeItem.atomic === true)
|
|||
const speckleData = props.treeItem?.raw as SpeckleObject
|
||||
const rawSpeckleData = props.treeItem?.raw as SpeckleObject
|
||||
|
||||
function getNestedModelHeader(name: string): string {
|
||||
const parts = name.split('/')
|
||||
return parts.length > 1 ? (parts.pop() as string) : name
|
||||
}
|
||||
|
||||
const headerAndSubheader = computed(() => {
|
||||
return getHeaderAndSubheaderForSpeckleObject(rawSpeckleData)
|
||||
const { header, subheader } = getHeaderAndSubheaderForSpeckleObject(rawSpeckleData)
|
||||
return {
|
||||
header: getNestedModelHeader(header),
|
||||
subheader
|
||||
}
|
||||
})
|
||||
|
||||
const childrenLength = computed(() => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче