Merge pull request #3435 from specklesystems/dim/hotfix-navis-props

fix: fixes navis props missing from filtering
This commit is contained in:
Dimitrie Stefanescu 2024-11-04 17:27:39 +00:00 коммит произвёл GitHub
Родитель 537e62c3b0 555070fa2c
Коммит 632653ce26
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -115,7 +115,11 @@ const {
} = useFilterUtilities()
const revitPropertyRegex = /^parameters\./
const revitPropertyRegexDui3000 = /^properties\./ // note this is partially valid for civil3d, or dim should test against it
// Note: we've split this regex check in two to not clash with navis properties. This makes generally makes dim very sad, as we're layering hacks.
// Navis object properties come under `properties`, same as revit ones - as such we can't assume they're the same. Here we're targeting revit's
// specific two subcategories of `properties`.
const revitPropertyRegexDui3000InstanceProps = /^properties\.Instance/ // note this is partially valid for civil3d, or dim should test against it
const revitPropertyRegexDui3000TypeProps = /^properties\.Type/ // note this is partially valid for civil3d, or dim should test against it
const showAllFilters = ref(false)
@ -124,7 +128,11 @@ const props = defineProps<{
}>()
const isRevitProperty = (key: string): boolean => {
return revitPropertyRegex.test(key) || revitPropertyRegexDui3000.test(key)
return (
revitPropertyRegex.test(key) ||
revitPropertyRegexDui3000InstanceProps.test(key) ||
revitPropertyRegexDui3000TypeProps.test(key)
)
}
const relevantFilters = computed(() => {