Skip to content

Commit

Permalink
Increase universe selection cap (#159)
Browse files Browse the repository at this point in the history
* demo version

* complement to filter selection

* dropdown menu for filters

* consistent color scheme throughout layers

* removes unused code

* Update globalStore.ts

* serialize method to filter for export

* linting

* filters to activefilters in treeline

* import plus icon

* adds useradded to filter

* Adds path to venn tooltip

* Adds add button to search bar and adding filters from calling store

* adds delete button to user added filters

* linting

* removes invalid comma in filter parsing

* Formatting

* PR feedback

* Moves Layer Selection to Venn

* Adjust search bar visually

* Selection List Vue Component

* Implements selection in TreeLine

* Implements selection for Venn

* Update TreeLine.ts

* Delete unused comment

* increase cap
  • Loading branch information
JoeAtHPI authored and ChristophTF committed Mar 15, 2023
1 parent f3694d3 commit 9e7c3fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { useGlobalStore } from '../../ts/stores/globalStore'
import ToggleSwitch from './ToggleSwitch.vue'
const MAX_OBSERVABLE_UNIVERSES = 2
const MAX_OBSERVABLE_UNIVERSES = 5
const store = useGlobalStore()
Expand Down
9 changes: 4 additions & 5 deletions observatory/src/ts/Visualizations/VennSets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ export class VennSets implements MultiverseVisualization {
}

public toggleSelection(event: any, node: Node, selection: Set<string>): void {
// as our selection is the toRaw variant of what's in store,
// the responding vue won't get an update that selection has changed
// which is perfect for us. contrary to higlighting, we aren't changing multiple
// nodes, but one at a time. and therefore only need to change the style of one
if (selection.has(node.identifier)) {
selection.delete(node.identifier)
} else {
Expand Down Expand Up @@ -208,7 +204,10 @@ export class VennSets implements MultiverseVisualization {
[...groups.entries()]
.map((group: Array<unknown>) => group[0] as string)
.sort()
.map((group: string, index: number) => [group, this.colorScheme[index]])
.map((group: string, index: number) => [
group,
this.colorScheme[index % this.colorScheme.length]
])
)

this.nodeHierarchy = d3
Expand Down

0 comments on commit 9e7c3fa

Please sign in to comment.