2021-10-17 18:26:00 +02:00
|
|
|
---
|
2022-10-18 16:53:01 +02:00
|
|
|
title: Hide or remove paths from an inherited part
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-18 16:53:43 +02:00
|
|
|
To hide paths from an inherited part, iterate over the `paths` object
|
2022-10-12 14:42:45 +02:00
|
|
|
and call `Path.hide()` on all entries:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
```mjs
|
|
|
|
for (const i in paths) paths[i].hide()
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
To outright remove the paths all together, delete them:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
```mjs
|
|
|
|
for (const i in paths) delete paths[i]
|
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::warning
|
2022-10-12 14:42:45 +02:00
|
|
|
Do __not__ replace the `path` object:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-12 14:42:45 +02:00
|
|
|
```mjs
|
|
|
|
paths = {}
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
2022-10-12 14:42:45 +02:00
|
|
|
|
2022-12-22 17:24:59 -08:00
|
|
|
as the `paths` object is more than a pojo (plain old JavaScript object)
|
2024-09-28 13:13:48 +02:00
|
|
|
:::
|
2022-10-12 14:42:45 +02:00
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::tip
|
2022-10-12 14:42:45 +02:00
|
|
|
You can use the same strategy for hiding or removing points or snippets.
|
2024-09-28 13:13:48 +02:00
|
|
|
:::
|