|
135 | 135 | editor.handle.toggleLayerLock(id);
|
136 | 136 | }
|
137 | 137 |
|
138 |
| - function handleExpandArrowClick(id: bigint) { |
139 |
| - editor.handle.toggleLayerExpansion(id); |
| 138 | + function handleExpandArrowClickWithModifiers(e: MouseEvent, id: bigint) { |
| 139 | + const accel = platformIsMac() ? e.metaKey : e.ctrlKey; |
| 140 | + const collapseRecursive = e.altKey || accel; |
| 141 | + editor.handle.toggleLayerExpansion(id, collapseRecursive); |
| 142 | + e.stopPropagation(); |
140 | 143 | }
|
141 | 144 |
|
142 | 145 | async function onEditLayerName(listing: LayerListingInfo) {
|
|
432 | 435 | class="expand-arrow"
|
433 | 436 | class:expanded={listing.entry.expanded}
|
434 | 437 | disabled={!listing.entry.childrenPresent}
|
435 |
| - title={listing.entry.expanded ? "Collapse" : `Expand${listing.entry.ancestorOfSelected ? "\n(A selected layer is contained within)" : ""}`} |
436 |
| - on:click|stopPropagation={() => handleExpandArrowClick(listing.entry.id)} |
| 438 | + title={listing.entry.expanded |
| 439 | + ? "Collapse (Click) / Collapse All (Alt Click)" |
| 440 | + : `Expand (Click) / Expand All (Alt Click)${listing.entry.ancestorOfSelected ? "\n(A selected layer is contained within)" : ""}`} |
| 441 | + on:click={(e) => handleExpandArrowClickWithModifiers(e, listing.entry.id)} |
437 | 442 | tabindex="0"
|
438 | 443 | ></button>
|
439 | 444 | {/if}
|
|
545 | 550 | }
|
546 | 551 |
|
547 | 552 | &.ancestor-of-selected .expand-arrow:not(.expanded) {
|
548 |
| - background-image: var(--inheritance-stripes-background); |
| 553 | + background-image: var(--inheritance-dots-background-6-lowergray); |
549 | 554 | }
|
550 | 555 |
|
551 | 556 | &.descendant-of-selected {
|
552 |
| - background-image: var(--inheritance-dots-background); |
| 557 | + background-image: var(--inheritance-dots-background-4-dimgray); |
553 | 558 | }
|
554 | 559 |
|
555 | 560 | &.selected-but-not-in-selected-network {
|
|
0 commit comments