perspective tre shows dependencies

This commit is contained in:
Jan Prochazka
2022-06-18 08:46:40 +02:00
parent f3ab06d3b8
commit 2ec3c2c24f
4 changed files with 74 additions and 32 deletions

View File

@@ -0,0 +1,52 @@
<script lang="ts">
import ColumnLabel from '../elements/ColumnLabel.svelte';
import { plusExpandIcon } from '../icons/expandIcons';
import FontIcon from '../icons/FontIcon.svelte';
export let node;
</script>
<div class="row">
<span class="expandColumnIcon" style={`margin-right: ${5 + node.level * 10}px`}>
<FontIcon
icon={node.isExpandable ? plusExpandIcon(node.isExpanded) : 'icon invisible-box'}
on:click={() => node.toggleExpanded()}
/>
</span>
<input
type="checkbox"
checked={node.isChecked}
on:click={e => {
e.stopPropagation();
}}
on:mousedown={e => {
e.stopPropagation();
}}
on:change={() => {
const newValue = !node.isChecked;
// display.setColumnVisibility(column.uniquePath, newValue);
// dispatch('setvisibility', newValue);
}}
/>
<FontIcon icon={node.icon} />
<span>{node.title}</span>
</div>
<style>
.row {
margin-left: 5px;
margin-right: 5px;
cursor: pointer;
white-space: nowrap;
}
.row:hover {
background: var(--theme-bg-hover);
}
.row.isSelected {
background: var(--theme-bg-selected);
}
</style>