codecharta-visualization 1.86.0 → 1.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Dockerfile +1 -1
- package/app/app.module.ts +30 -6
- package/app/codeCharta/codeCharta.component.html +0 -2
- package/app/codeCharta/codeCharta.component.ts +2 -0
- package/app/codeCharta/codeCharta.model.ts +8 -5
- package/app/codeCharta/codeCharta.service.spec.ts +41 -50
- package/app/codeCharta/codeCharta.service.ts +33 -32
- package/app/codeCharta/e2e/url.e2e.ts +1 -1
- package/app/codeCharta/services/ajs-upgraded-providers.ts +13 -0
- package/app/codeCharta/state/angular-redux/effects/createEffect.spec.ts +37 -0
- package/app/codeCharta/state/angular-redux/effects/createEffect.ts +25 -0
- package/app/codeCharta/state/angular-redux/effects/effects.module.ts +36 -0
- package/app/codeCharta/state/angular-redux/ofType.ts +11 -0
- package/app/codeCharta/state/angular-redux/state.ts +12 -0
- package/app/codeCharta/state/angular-redux/store.ts +1 -1
- package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/addBlacklistItemsIfNotResultsInEmptyMap.effect.spec.ts +60 -0
- package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/addBlacklistItemsIfNotResultsInEmptyMap.effect.ts +56 -0
- package/app/codeCharta/state/effects/addBlacklistItemsIfNotResultsInEmptyMap/resultsInEmptyMap.ts +22 -0
- package/app/codeCharta/state/effects/nodeContextMenu/excludeButton/excludeButton.component.html +3 -0
- package/app/codeCharta/state/effects/nodeContextMenu/excludeButton/excludeButton.component.ts +26 -0
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.html +13 -0
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.spec.ts +55 -0
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.component.ts +34 -0
- package/app/codeCharta/state/effects/nodeContextMenu/flattenButtons/flattenButtons.module.ts +11 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.html +24 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.spec.ts +55 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.component.ts +38 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/focusButtons.module.ts +13 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/isNodeFocused.pipe.spec.ts +31 -0
- package/app/codeCharta/state/effects/nodeContextMenu/focusButtons/isNodeFocused.pipe.ts +25 -0
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.html +6 -0
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.spec.ts +64 -0
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.component.ts +39 -0
- package/app/codeCharta/state/effects/nodeContextMenu/highlightButtons/highlightButtons.module.ts +11 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.html +22 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.scss +31 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.spec.ts +35 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.component.ts +30 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/markFolderRow.module.ts +11 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/selectors/markFolderItems.selector.spec.ts +17 -0
- package/app/codeCharta/state/effects/nodeContextMenu/markFolderRow/selectors/markFolderItems.selector.ts +29 -0
- package/app/codeCharta/{ui → state/effects}/nodeContextMenu/nodeContextMenu.e2e.ts +4 -16
- package/app/codeCharta/{ui → state/effects}/nodeContextMenu/nodeContextMenu.po.ts +1 -1
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenu.service.spec.ts +78 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenu.service.ts +72 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/lastPartOfNodePath.pipe.spec.ts +11 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/lastPartOfNodePath.pipe.ts +8 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.html +17 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.scss +34 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.spec.ts +49 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.component.ts +19 -0
- package/app/codeCharta/state/effects/nodeContextMenu/nodeContextMenuCard/nodeContextMenuCard.module.ts +18 -0
- package/app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect.spec.ts +32 -0
- package/app/codeCharta/state/effects/nodeContextMenu/openNodeContextMenu.effect.ts +33 -0
- package/app/codeCharta/state/effects/nodeContextMenu/rightClickedCodeMapNode.selector.ts +8 -0
- package/app/codeCharta/state/effects/unfocusNodesOnLoadingMap.effect.spec.ts +47 -0
- package/app/codeCharta/state/effects/unfocusNodesOnLoadingMap.effect.ts +18 -0
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/areAllNecessaryRenderDataAvailable.selector.ts +30 -0
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areDynamicSettingsAvailable.spec.ts +36 -0
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areDynamicSettingsAvailable.ts +10 -0
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areMetricsAvailable.spec.ts +13 -0
- package/app/codeCharta/state/selectors/allNecessaryRenderDataAvailable/utils/areMetricsAvailable.ts +8 -0
- package/app/codeCharta/state/store/appSettings/appSettings.actions.ts +2 -0
- package/app/codeCharta/state/store/appSettings/appSettings.reducer.ts +2 -0
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.actions.ts +32 -0
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.reducer.spec.ts +26 -0
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.reducer.ts +12 -0
- package/app/codeCharta/state/store/appSettings/invertArea/invertArea.selector.ts +3 -0
- package/app/codeCharta/state/store/appSettings/isLoadingMap/isLoadingMap.reducer.spec.ts +14 -3
- package/app/codeCharta/state/store/appSettings/isLoadingMap/isLoadingMap.reducer.ts +41 -6
- package/app/codeCharta/state/store/appStatus/appStatus.reducer.ts +3 -1
- package/app/codeCharta/state/store/appStatus/appStatus.selector.ts +3 -0
- package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.actions.ts +23 -0
- package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.reducer.ts +15 -0
- package/app/codeCharta/state/store/appStatus/rightClickedNodeData/rightClickedNodeData.selector.ts +4 -0
- package/app/codeCharta/state/store/dynamicSettings/dynamicSettings.splitter.ts +2 -2
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/currentFocused.selector.ts +8 -0
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.actions.ts +27 -7
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.reducer.spec.ts +27 -11
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.reducer.ts +11 -5
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.selector.ts +4 -0
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.service.spec.ts +2 -2
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.service.ts +1 -1
- package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.actions.ts +33 -2
- package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.reducer.spec.ts +17 -1
- package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.reducer.ts +3 -1
- package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.service.spec.ts +1 -19
- package/app/codeCharta/state/store/fileSettings/blacklist/blacklist.service.ts +5 -28
- package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.actions.ts +9 -10
- package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.reducer.spec.ts +37 -7
- package/app/codeCharta/state/store/fileSettings/markedPackages/markedPackages.reducer.ts +7 -3
- package/app/codeCharta/state/store/fileSettings/markedPackages/util/findIndexOfMarkedPackageOrParent.spec.ts +39 -0
- package/app/codeCharta/state/store/fileSettings/markedPackages/util/findIndexOfMarkedPackageOrParent.ts +19 -0
- package/app/codeCharta/state/store/lookUp/idToNode/idToNode.selector.ts +4 -0
- package/app/codeCharta/state/store/lookUp/lookUp.selector.ts +3 -0
- package/app/codeCharta/state/store/metricData/nodeMetricData/nodeMetricData.service.ts +0 -4
- package/app/codeCharta/state/store/state.actions.ts +3 -1
- package/app/codeCharta/state/store/state.splitter.spec.ts +4 -4
- package/app/codeCharta/state/store/store.ts +5 -1
- package/app/codeCharta/state/store.service.spec.ts +21 -8
- package/app/codeCharta/state/store.service.ts +3 -31
- package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.html +3 -1
- package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.scss +6 -2
- package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.component.ts +1 -1
- package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.module.ts +3 -0
- package/app/codeCharta/ui/areaSettingsPanel/areaSettingsPanel.po.ts +4 -4
- package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.html +1 -0
- package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.scss +26 -0
- package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.spec.ts +29 -0
- package/app/codeCharta/ui/areaSettingsPanel/invertAreaOption/invertAreaOption.component.ts +24 -0
- package/app/codeCharta/ui/artificialIntelligence/__snapshots__/artificialIntelligence.component.spec.ts.snap +13 -16
- package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.html +4 -4
- package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.scss +0 -4
- package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.spec.ts +82 -52
- package/app/codeCharta/ui/artificialIntelligence/artificialIntelligence.component.ts +41 -101
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/aggregationType.pipe.spec.ts +19 -0
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/{aggregationSymbol.pipe.ts → aggregationType.pipe.ts} +4 -4
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.html +4 -12
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.scss +11 -20
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.component.spec.ts +8 -15
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/attributeTypeSelector.module.ts +2 -2
- package/app/codeCharta/ui/codeMap/__snapshots__/codeMap.arrow.service.spec.ts.snap +2 -2
- package/app/codeCharta/ui/codeMap/codeMap.actions.service.ts +1 -40
- package/app/codeCharta/ui/codeMap/codeMap.mouseEvent.service.ts +8 -16
- package/app/codeCharta/ui/codeMap/codeMap.preRender.service.spec.ts +1 -9
- package/app/codeCharta/ui/codeMap/codeMap.preRender.service.ts +9 -32
- package/app/codeCharta/ui/codeMap/rendering/codeMapMesh.ts +1 -0
- package/app/codeCharta/ui/colorPicker/colorPicker.component.html +16 -7
- package/app/codeCharta/ui/colorPicker/colorPicker.component.spec.ts +55 -16
- package/app/codeCharta/ui/colorPicker/colorPicker.component.ts +32 -1
- package/app/codeCharta/ui/colorPicker/colorPicker.module.ts +3 -1
- package/app/codeCharta/ui/customConfigs/customConfigs.component.html +29 -11
- package/app/codeCharta/ui/customConfigs/customConfigs.component.scss +1 -0
- package/app/codeCharta/ui/customConfigs/customConfigs.component.spec.ts +123 -2
- package/app/codeCharta/ui/customConfigs/customConfigs.component.ts +56 -2
- package/app/codeCharta/ui/dialog/dialog.addCustomConfigSettings.component.html +2 -2
- package/app/codeCharta/ui/dialog/dialog.changelog.component.html +1 -1
- package/app/codeCharta/ui/dialog/dialog.changelog.component.scss +15 -0
- package/app/codeCharta/ui/dialog/dialog.changelog.component.spec.ts +15 -15
- package/app/codeCharta/ui/dialog/dialog.changelog.component.ts +2 -1
- package/app/codeCharta/ui/dialog/dialog.globalSettings.e2e.ts +1 -1
- package/app/codeCharta/ui/dialog/dialog.globalSettings.po.ts +1 -1
- package/app/codeCharta/ui/dialog/dialog.service.spec.ts +68 -0
- package/app/codeCharta/ui/dialog/dialog.service.ts +38 -17
- package/app/codeCharta/ui/dialogs/dialogs.ts +3 -0
- package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.html +7 -0
- package/app/codeCharta/ui/dialogs/errorDialog/errorDialog.component.ts +9 -0
- package/app/codeCharta/ui/edgeChooser/edgeChooser.e2e.ts +3 -2
- package/app/codeCharta/ui/fileChooser/fileChooser.e2e.ts +5 -6
- package/app/codeCharta/ui/filePanel/filePanel.component.html +24 -106
- package/app/codeCharta/ui/filePanel/filePanel.component.scss +12 -57
- package/app/codeCharta/ui/filePanel/filePanel.component.spec.ts +40 -72
- package/app/codeCharta/ui/filePanel/filePanel.component.ts +29 -81
- package/app/codeCharta/ui/filePanel/filePanel.module.ts +13 -1
- package/app/codeCharta/ui/filePanel/filePanel.po.ts +6 -24
- package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.html +23 -0
- package/app/codeCharta/ui/filePanel/filePanelDeltaSelector/filePanelDeltaSelector.component.ts +18 -0
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.html +18 -0
- package/app/codeCharta/ui/filePanel/filePanelFileSelector/filePanelFileSelector.component.ts +16 -0
- package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.html +18 -0
- package/app/codeCharta/ui/filePanel/filePanelStateButtons/filePanelStateButtons.component.ts +11 -0
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.html +21 -13
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.spec.ts +11 -24
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.component.ts +1 -40
- package/app/codeCharta/ui/labelledColorPicker/labelledColorPicker.module.ts +1 -2
- package/app/codeCharta/ui/legendPanel/legendMarkedPackages/legendMarkedPackages.component.ts +2 -2
- package/app/codeCharta/ui/mapTreeView/mapTreeView.level.e2e.ts +8 -6
- package/app/codeCharta/ui/mapTreeView/mapTreeView.level.po.ts +1 -1
- package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.html +1 -1
- package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.spec.ts +6 -16
- package/app/codeCharta/ui/mapTreeView/mapTreeViewLevel/mapTreeViewLevel.component.ts +15 -11
- package/app/codeCharta/ui/ribbonBar/ribbonBar.component.html +3 -3
- package/app/codeCharta/ui/ribbonBar/ribbonBar.e2e.ts +3 -3
- package/app/codeCharta/ui/searchBar/searchBar.component.html +5 -0
- package/app/codeCharta/ui/searchBar/searchBar.component.scss +11 -0
- package/app/codeCharta/ui/searchBar/searchBar.component.spec.ts +10 -0
- package/app/codeCharta/ui/searchBar/searchBar.component.ts +1 -1
- package/app/codeCharta/ui/sortingOption/sortingOption.component.spec.ts +1 -1
- package/app/codeCharta/ui/toolBar/toolBar.component.html +1 -1
- package/app/codeCharta/ui/toolBar/toolBar.component.scss +1 -1
- package/app/codeCharta/ui/ui.ts +2 -6
- package/app/codeCharta/util/algorithm/streetLayout/strip/strip.ts +2 -2
- package/app/codeCharta/util/algorithm/streetLayout/treeMap.ts +1 -1
- package/app/codeCharta/util/algorithm/treeMapLayout/treeMapGenerator.spec.ts +2 -2
- package/app/codeCharta/util/algorithm/treeMapLayout/treeMapGenerator.ts +14 -7
- package/app/codeCharta/util/algorithm/treeMapLayout/treeMapHelper.spec.ts +2 -2
- package/app/codeCharta/util/algorithm/treeMapLayout/treeMapHelper.ts +1 -1
- package/app/codeCharta/util/customConfigBuilder.ts +2 -1
- package/app/codeCharta/util/customConfigHelper.spec.ts +155 -60
- package/app/codeCharta/util/customConfigHelper.ts +33 -3
- package/app/codeCharta/util/dataMocks.ts +8 -4
- package/app/codeCharta/util/fileExtensionCalculator.ts +1 -1
- package/app/codeCharta/util/fileValidator.spec.ts +69 -182
- package/app/codeCharta/util/fileValidator.ts +61 -37
- package/app/codeCharta/util/reduxHelper.ts +11 -0
- package/app/material/material.module.ts +17 -1
- package/conf/webpack.loaders.js +4 -1
- package/dist/webpack/bundle.js +5925 -1896
- package/dist/webpack/bundle.js.map +1 -1
- package/package.json +7 -6
- package/app/codeCharta/state/store/dynamicSettings/focusedNodePath/focusedNodePath.splitter.ts +0 -8
- package/app/codeCharta/ui/attributeSideBar/attributeTypeSelector/aggregationSymbol.pipe.spec.ts +0 -19
- package/app/codeCharta/ui/codeMap/codeMap.actions.service.spec.ts +0 -147
- package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.html +0 -5
- package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.scss +0 -13
- package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.component.ts +0 -30
- package/app/codeCharta/ui/nodeContextMenu/markFolderColorPicker/markFolderColorPicker.module.ts +0 -13
- package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.html +0 -68
- package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.scss +0 -52
- package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.spec.ts +0 -571
- package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.component.ts +0 -318
- package/app/codeCharta/ui/nodeContextMenu/nodeContextMenu.module.ts +0 -13
- package/app/codeCharta/ui/unfocusButton/unfocusButton.component.html +0 -15
- package/app/codeCharta/ui/unfocusButton/unfocusButton.component.scss +0 -5
- package/app/codeCharta/ui/unfocusButton/unfocusButton.component.spec.ts +0 -106
- package/app/codeCharta/ui/unfocusButton/unfocusButton.component.ts +0 -62
- package/app/codeCharta/ui/unfocusButton/unfocusButton.module.ts +0 -7
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
id="{{ node.path }}"
|
|
4
4
|
class="tree-element-label-{{ depth }} tree-element-label"
|
|
5
5
|
[class.hovered]="(hoveredBuildingPath$ | async) === node.path"
|
|
6
|
-
[class.marked]="
|
|
6
|
+
[class.marked]="(rightClickedNodeData$ | async)?.nodeId === node.id"
|
|
7
7
|
(mouseenter)="onMouseEnter()"
|
|
8
8
|
(mouseleave)="onMouseLeave()"
|
|
9
9
|
(click)="toggleOpen()"
|
|
@@ -4,17 +4,10 @@ import userEvent from "@testing-library/user-event"
|
|
|
4
4
|
|
|
5
5
|
import { searchedNodePathsSelector } from "../../../state/selectors/searchedNodes/searchedNodePaths.selector"
|
|
6
6
|
import { Store } from "../../../state/store/store"
|
|
7
|
-
import { NodeContextMenuController } from "../../nodeContextMenu/nodeContextMenu.component"
|
|
8
7
|
import { MapTreeViewModule } from "../mapTreeView.module"
|
|
9
8
|
import { MapTreeViewLevelComponent } from "./mapTreeViewLevel.component"
|
|
10
9
|
import { rootNode } from "./mocks"
|
|
11
10
|
|
|
12
|
-
jest.mock("../../nodeContextMenu/nodeContextMenu.component", () => ({
|
|
13
|
-
NodeContextMenuController: {
|
|
14
|
-
subscribeToHideNodeContextMenu: () => {},
|
|
15
|
-
broadcastShowEvent: jest.fn()
|
|
16
|
-
}
|
|
17
|
-
}))
|
|
18
11
|
jest.mock("../../../state/selectors/searchedNodes/searchedNodePaths.selector", () => ({
|
|
19
12
|
searchedNodePathsSelector: jest.fn(
|
|
20
13
|
jest.requireActual("../../../state/selectors/searchedNodes/searchedNodePaths.selector").searchedNodePathsSelector
|
|
@@ -76,21 +69,18 @@ describe("mapTreeViewLevel", () => {
|
|
|
76
69
|
expect(firstLevelFolder.querySelector("cc-map-tree-view-item-option-buttons")).toBeTruthy()
|
|
77
70
|
})
|
|
78
71
|
|
|
79
|
-
it("should
|
|
80
|
-
const nodeContextMenuSpy = jest.spyOn(NodeContextMenuController, "broadcastShowEvent")
|
|
81
|
-
|
|
72
|
+
it("should show option button on hover and be marked after context menu was opened", async () => {
|
|
82
73
|
const { container } = await render(MapTreeViewLevelComponent, { componentProperties, excludeComponentDeclaration: true })
|
|
74
|
+
|
|
83
75
|
const firstLevelFolder = container.querySelector("#\\/root\\/ParentLeaf")
|
|
76
|
+
let optionsButton = firstLevelFolder.querySelector("cc-map-tree-view-item-option-buttons")
|
|
77
|
+
expect(optionsButton).toBe(null)
|
|
84
78
|
|
|
85
79
|
userEvent.hover(firstLevelFolder)
|
|
86
|
-
|
|
80
|
+
optionsButton = firstLevelFolder.querySelector("cc-map-tree-view-item-option-buttons")
|
|
81
|
+
expect(optionsButton).not.toBe(null)
|
|
87
82
|
fireEvent.click(optionsButton.querySelector("[title='Open Node-Context-Menu']"))
|
|
88
83
|
|
|
89
|
-
expect(nodeContextMenuSpy).toHaveBeenCalled()
|
|
90
|
-
const argumentsToNodeContextMenu = nodeContextMenuSpy.mock.calls[0]
|
|
91
|
-
expect(argumentsToNodeContextMenu[1]).toBe("/root/ParentLeaf")
|
|
92
|
-
expect(argumentsToNodeContextMenu[2]).toBe("Folder")
|
|
93
|
-
|
|
94
84
|
const isMarked = container.querySelector("#\\/root\\/ParentLeaf.marked")
|
|
95
85
|
expect(isMarked).toBeTruthy()
|
|
96
86
|
})
|
|
@@ -5,7 +5,11 @@ import { Store } from "../../../state/angular-redux/store"
|
|
|
5
5
|
import { CodeMapNode } from "../../../codeCharta.model"
|
|
6
6
|
import { hoveredBuildingPathSelector } from "../../../state/store/appStatus/hoveredBuildingPath/hoveredBuildingPath.selector"
|
|
7
7
|
import { setHoveredBuildingPath } from "../../../state/store/appStatus/hoveredBuildingPath/hoveredBuildingPath.actions"
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
RightClickedNodeData,
|
|
10
|
+
setRightClickedNodeData
|
|
11
|
+
} from "../../../state/store/appStatus/rightClickedNodeData/rightClickedNodeData.actions"
|
|
12
|
+
import { rightClickedNodeDataSelector } from "../../../state/store/appStatus/rightClickedNodeData/rightClickedNodeData.selector"
|
|
9
13
|
|
|
10
14
|
@Component({
|
|
11
15
|
selector: "cc-map-tree-view-level",
|
|
@@ -16,14 +20,13 @@ export class MapTreeViewLevelComponent implements OnInit {
|
|
|
16
20
|
@Input() depth: number
|
|
17
21
|
|
|
18
22
|
hoveredBuildingPath$: Observable<string | null>
|
|
23
|
+
rightClickedNodeData$: Observable<RightClickedNodeData>
|
|
19
24
|
|
|
20
25
|
isOpen = false
|
|
21
|
-
isContextMenuOpenForNode = false
|
|
22
26
|
|
|
23
27
|
constructor(@Inject(Store) private store: Store) {
|
|
24
28
|
this.hoveredBuildingPath$ = this.store.select(hoveredBuildingPathSelector)
|
|
25
|
-
|
|
26
|
-
NodeContextMenuController.subscribeToHideNodeContextMenu(undefined, this)
|
|
29
|
+
this.rightClickedNodeData$ = this.store.select(rightClickedNodeDataSelector)
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
ngOnInit(): void {
|
|
@@ -33,10 +36,6 @@ export class MapTreeViewLevelComponent implements OnInit {
|
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
|
|
36
|
-
onHideNodeContextMenu() {
|
|
37
|
-
this.isContextMenuOpenForNode = false
|
|
38
|
-
}
|
|
39
|
-
|
|
40
39
|
onMouseEnter() {
|
|
41
40
|
this.store.dispatch(setHoveredBuildingPath(this.node.path))
|
|
42
41
|
}
|
|
@@ -49,8 +48,13 @@ export class MapTreeViewLevelComponent implements OnInit {
|
|
|
49
48
|
$event.stopPropagation()
|
|
50
49
|
$event.preventDefault()
|
|
51
50
|
|
|
52
|
-
this.
|
|
53
|
-
|
|
51
|
+
this.store.dispatch(
|
|
52
|
+
setRightClickedNodeData({
|
|
53
|
+
nodeId: this.node.id,
|
|
54
|
+
xPositionOfRightClickEvent: $event.clientX,
|
|
55
|
+
yPositionOfRightClickEvent: $event.clientY
|
|
56
|
+
})
|
|
57
|
+
)
|
|
54
58
|
|
|
55
59
|
document.querySelector(".tree-element-0").addEventListener("scroll", this.scrollFunction)
|
|
56
60
|
}
|
|
@@ -60,7 +64,7 @@ export class MapTreeViewLevelComponent implements OnInit {
|
|
|
60
64
|
}
|
|
61
65
|
|
|
62
66
|
private scrollFunction = () => {
|
|
63
|
-
|
|
67
|
+
this.store.dispatch(setRightClickedNodeData(null))
|
|
64
68
|
document.querySelector(".tree-element-0").removeEventListener("scroll", this.scrollFunction)
|
|
65
69
|
}
|
|
66
70
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<div class="section-header">
|
|
15
15
|
<custom-configs-component></custom-configs-component>
|
|
16
16
|
</div>
|
|
17
|
-
<span class="section-title no-hover">
|
|
17
|
+
<span class="section-title no-hover">Custom Views</span>
|
|
18
18
|
</div>
|
|
19
19
|
</md-card>
|
|
20
20
|
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
>Area Metric Options <i class="fa fa-angle-down"></i
|
|
46
46
|
></span>
|
|
47
47
|
</div>
|
|
48
|
-
<area-settings-panel
|
|
48
|
+
<cc-area-settings-panel
|
|
49
49
|
ng-class="{
|
|
50
50
|
hidden: $ctrl._viewModel.panelSelection !== $ctrl._viewModel.panelSelectionValues.AREA_PANEL_OPEN
|
|
51
51
|
}"
|
|
52
|
-
></area-settings-panel
|
|
52
|
+
></cc-area-settings-panel>
|
|
53
53
|
</md-card>
|
|
54
54
|
|
|
55
55
|
<md-card
|
|
@@ -47,7 +47,7 @@ describe("RibbonBar", () => {
|
|
|
47
47
|
})
|
|
48
48
|
|
|
49
49
|
describe("opening and closing ribbon-bar cards", () => {
|
|
50
|
-
it("
|
|
50
|
+
it("search-panel-card", async () => {
|
|
51
51
|
let isSearchPanelOpen = await searchPanel.toggle()
|
|
52
52
|
expect(isSearchPanelOpen).toBeTruthy()
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ describe("RibbonBar", () => {
|
|
|
55
55
|
expect(isSearchPanelOpen).toBeFalsy()
|
|
56
56
|
})
|
|
57
57
|
|
|
58
|
-
it("height-metric
|
|
58
|
+
it("height-metric card", async () => {
|
|
59
59
|
const panel = "height-metric"
|
|
60
60
|
|
|
61
61
|
let isHeightSettingsPanelOpen = await ribbonBar.togglePanel(panel)
|
|
@@ -85,7 +85,7 @@ describe("RibbonBar", () => {
|
|
|
85
85
|
expect(isColorSettingsPanelOpen).toBeFalsy()
|
|
86
86
|
})
|
|
87
87
|
|
|
88
|
-
it("edge-metric", async () => {
|
|
88
|
+
it("edge-metric card", async () => {
|
|
89
89
|
const panel = "edge-metric"
|
|
90
90
|
|
|
91
91
|
let isEdgeSettingsPanelOpen = await ribbonBar.togglePanel(panel)
|
|
@@ -9,6 +9,11 @@
|
|
|
9
9
|
ng-model="$ctrl._viewModel.searchPattern"
|
|
10
10
|
ng-change="$ctrl.handleSearchPatternChange()"
|
|
11
11
|
/>
|
|
12
|
+
<span class="small-action-button transparent clear-icon" ng-if="!$ctrl.isSearchPatternEmpty()">
|
|
13
|
+
<md-button class="md-fab" ng-click="$ctrl.resetSearchPattern()">
|
|
14
|
+
<i class="fa fa-times"></i>
|
|
15
|
+
</md-button>
|
|
16
|
+
</span>
|
|
12
17
|
</md-input-container>
|
|
13
18
|
|
|
14
19
|
<md-menu>
|
|
@@ -21,6 +21,17 @@ search-bar-component {
|
|
|
21
21
|
vertical-align: middle;
|
|
22
22
|
display: inline-block;
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
#searchInput {
|
|
26
|
+
padding-right: 24px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.clear-icon {
|
|
30
|
+
position: absolute;
|
|
31
|
+
right: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
margin-top: 2px;
|
|
34
|
+
}
|
|
24
35
|
}
|
|
25
36
|
|
|
26
37
|
.small-action-button {
|
|
@@ -213,4 +213,14 @@ describe("SearchBarController", () => {
|
|
|
213
213
|
}, SearchBarController["DEBOUNCE_TIME"] + SOME_EXTRA_TIME)
|
|
214
214
|
})
|
|
215
215
|
})
|
|
216
|
+
|
|
217
|
+
describe("resetSearchPattern", () => {
|
|
218
|
+
it("should clear the SearchPattern", () => {
|
|
219
|
+
searchBarController["_viewModel"].searchPattern = "pattern"
|
|
220
|
+
|
|
221
|
+
searchBarController.resetSearchPattern()
|
|
222
|
+
|
|
223
|
+
expect(searchBarController.isSearchPatternEmpty()).toBeTruthy()
|
|
224
|
+
})
|
|
225
|
+
})
|
|
216
226
|
})
|
|
@@ -17,7 +17,7 @@ describe("SortingOptionComponent", () => {
|
|
|
17
17
|
|
|
18
18
|
it("should have an explaining title", async () => {
|
|
19
19
|
await render(SortingOptionComponent)
|
|
20
|
-
expect(screen.
|
|
20
|
+
expect(await screen.findByTitle("Sort by")).toBeTruthy()
|
|
21
21
|
})
|
|
22
22
|
|
|
23
23
|
it("should be a select for the sorting option", async () => {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<screenshot-button-component></screenshot-button-component>
|
|
5
5
|
<cc-export-threed-map-button></cc-export-threed-map-button>
|
|
6
6
|
|
|
7
|
-
<file-panel
|
|
7
|
+
<cc-file-panel ng-class="{ hidden: $ctrl._viewModel.isNodeHovered }"></cc-file-panel>
|
|
8
8
|
<node-path-panel-component ng-class="{ hidden: !$ctrl._viewModel.isNodeHovered }"></node-path-panel-component>
|
|
9
9
|
|
|
10
10
|
<div class="right-aligned">
|
package/app/codeCharta/ui/ui.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { downgradeComponent } from "@angular/upgrade/static"
|
|
|
3
3
|
|
|
4
4
|
import "./artificialIntelligence/artificialIntelligence.module"
|
|
5
5
|
import "./customConfigs/customConfigs.module"
|
|
6
|
-
import "./unfocusButton/unfocusButton.module"
|
|
7
6
|
import "./metricValueHovered/metricValueHovered.module"
|
|
8
7
|
import "./downloadButton/downloadButton.module"
|
|
9
8
|
import "./screenshotButton/screenshotButton.module"
|
|
@@ -27,7 +26,6 @@ import "./heightSettingsPanel/heightSettingsPanel.module"
|
|
|
27
26
|
import "./loadingGif/loadingGif.module"
|
|
28
27
|
import "./metricChooser/metricChooser.module"
|
|
29
28
|
import "./metricType/metricType.module"
|
|
30
|
-
import "./nodeContextMenu/nodeContextMenu.module"
|
|
31
29
|
import "./rangeSlider/rangeSlider.module"
|
|
32
30
|
import "./resetSettingsButton/resetSettingsButton.module"
|
|
33
31
|
import "./filePanel/filePanel.module"
|
|
@@ -51,7 +49,6 @@ angular
|
|
|
51
49
|
.module("app.codeCharta.ui", [
|
|
52
50
|
"app.codeCharta.ui.artificialIntelligence",
|
|
53
51
|
"app.codeCharta.ui.customConfigs",
|
|
54
|
-
"app.codeCharta.ui.unfocusButton",
|
|
55
52
|
"app.codeCharta.ui.metricValueHovered",
|
|
56
53
|
"app.codeCharta.ui.downloadButton",
|
|
57
54
|
"app.codeCharta.ui.screenshotButton",
|
|
@@ -72,12 +69,10 @@ angular
|
|
|
72
69
|
"app.codeCharta.ui.dialog",
|
|
73
70
|
"app.codeCharta.ui.fileChooser",
|
|
74
71
|
"app.codeCharta.ui.fileExtensionBar",
|
|
75
|
-
"app.codeCharta.ui.filePanel",
|
|
76
72
|
"app.codeCharta.ui.heightSettingsPanel",
|
|
77
73
|
"app.codeCharta.ui.loadingGif",
|
|
78
74
|
"app.codeCharta.ui.metricChooser",
|
|
79
75
|
"app.codeCharta.ui.metricType",
|
|
80
|
-
"app.codeCharta.ui.nodeContextMenu",
|
|
81
76
|
"app.codeCharta.ui.rangeSlider",
|
|
82
77
|
"app.codeCharta.ui.resetSettingsButton",
|
|
83
78
|
"app.codeCharta.ui.ribbonBar",
|
|
@@ -86,7 +81,8 @@ angular
|
|
|
86
81
|
"app.codeCharta.ui.viewCube",
|
|
87
82
|
"app.codeCharta.ui.layoutSelection",
|
|
88
83
|
"app.codeCharta.ui.sharpnessModeSelector",
|
|
89
|
-
"app.codeCharta.ui.maxTreeMapFiles"
|
|
84
|
+
"app.codeCharta.ui.maxTreeMapFiles",
|
|
85
|
+
"app.codeCharta.ui.filePanel"
|
|
90
86
|
])
|
|
91
87
|
.directive("ccSortingButton", downgradeComponent({ component: SortingButtonComponent }))
|
|
92
88
|
.directive("ccSortingOption", downgradeComponent({ component: SortingOptionComponent }))
|
|
@@ -10,7 +10,7 @@ export default abstract class Strip {
|
|
|
10
10
|
this.nodes = nodes
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
abstract layout(
|
|
14
14
|
rect: Rectangle,
|
|
15
15
|
rootSize: number,
|
|
16
16
|
metricName: string,
|
|
@@ -19,7 +19,7 @@ export default abstract class Strip {
|
|
|
19
19
|
order?: number
|
|
20
20
|
): CodeMapNode[]
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
protected abstract worstAspectRatio(nodes: CodeMapNode[], rect: Rectangle, rootSize: number, metricName: string): number
|
|
23
23
|
|
|
24
24
|
totalScaledSize(nodes: CodeMapNode[], metricName: string, rootSize: number, rootArea: number): number {
|
|
25
25
|
return nodes.reduce((total, n) => total + this.scaledSize(n, rootSize, rootArea, metricName), 0)
|
|
@@ -11,7 +11,7 @@ export default abstract class Treemap extends BoundingBox {
|
|
|
11
11
|
super(rootNode)
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
abstract layout(margin: number, origin: Vector2): CodeMapNode[]
|
|
15
15
|
|
|
16
16
|
calculateDimension(metricName: string): void {
|
|
17
17
|
this.metricName = metricName
|
|
@@ -34,7 +34,7 @@ describe("treeMapGenerator", () => {
|
|
|
34
34
|
codeMapNode = klona(VALID_NODE_WITH_PATH)
|
|
35
35
|
metricData = klona(METRIC_DATA)
|
|
36
36
|
isDeltaState = false
|
|
37
|
-
state.dynamicSettings.focusedNodePath =
|
|
37
|
+
state.dynamicSettings.focusedNodePath = []
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
describe("create Treemap nodes", () => {
|
|
@@ -181,7 +181,7 @@ describe("treeMapGenerator", () => {
|
|
|
181
181
|
|
|
182
182
|
describe("calculateAreaValue", () => {
|
|
183
183
|
it("should return 0 if node has children, not blacklisted and not only visible in comparison map", () => {
|
|
184
|
-
const actual = SquarifiedLayoutGenerator.calculateAreaValue(codeMapNode, state)
|
|
184
|
+
const actual = SquarifiedLayoutGenerator.calculateAreaValue(codeMapNode, state, 400)
|
|
185
185
|
|
|
186
186
|
expect(actual).toBe(0)
|
|
187
187
|
})
|
|
@@ -12,6 +12,7 @@ const DEFAULT_PADDING_FLOOR_LABEL_FROM_LEVEL_2 = 95
|
|
|
12
12
|
export function createTreemapNodes(map: CodeMapNode, state: State, metricData: NodeMetricData[], isDeltaState: boolean): Node[] {
|
|
13
13
|
const mapSizeResolutionScaling = getMapResolutionScaleFactor(state.files)
|
|
14
14
|
const maxHeight = metricData.find(x => x.name === state.dynamicSettings.heightMetric).maxValue * mapSizeResolutionScaling
|
|
15
|
+
const maxWidth = metricData.find(x => x.name === state.dynamicSettings.areaMetric).maxValue * mapSizeResolutionScaling
|
|
15
16
|
const heightScale = (state.treeMap.mapSize * 2) / maxHeight
|
|
16
17
|
|
|
17
18
|
if (hasFixedFolders(map)) {
|
|
@@ -42,14 +43,14 @@ export function createTreemapNodes(map: CodeMapNode, state: State, metricData: N
|
|
|
42
43
|
0,
|
|
43
44
|
heightScale,
|
|
44
45
|
maxHeight,
|
|
46
|
+
maxWidth,
|
|
45
47
|
isDeltaState,
|
|
46
48
|
mapSizeResolutionScaling
|
|
47
49
|
)
|
|
48
50
|
]
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
const squarifiedTreeMap = getSquarifiedTreeMap(map, state, mapSizeResolutionScaling)
|
|
52
|
-
|
|
53
|
+
const squarifiedTreeMap = getSquarifiedTreeMap(map, state, mapSizeResolutionScaling, maxWidth)
|
|
53
54
|
const nodes: Node[] = []
|
|
54
55
|
for (const squarifiedNode of squarifiedTreeMap.treeMap) {
|
|
55
56
|
nodes.push(TreeMapHelper.buildNodeFrom(squarifiedNode, heightScale, maxHeight, state, isDeltaState))
|
|
@@ -66,6 +67,7 @@ function buildSquarifiedTreeMapsForFixedFolders(
|
|
|
66
67
|
offsetY0: number,
|
|
67
68
|
heightScale: number,
|
|
68
69
|
maxHeight: number,
|
|
70
|
+
maxWidth: number,
|
|
69
71
|
isDeltaState: boolean,
|
|
70
72
|
mapSizeResolutionScaling: number
|
|
71
73
|
) {
|
|
@@ -73,7 +75,7 @@ function buildSquarifiedTreeMapsForFixedFolders(
|
|
|
73
75
|
|
|
74
76
|
for (const fixedFolder of hierarchyNode.children) {
|
|
75
77
|
const fixedPosition = fixedFolder.data.fixedPosition
|
|
76
|
-
const squarified = getSquarifiedTreeMap(fixedFolder.data, state, mapSizeResolutionScaling)
|
|
78
|
+
const squarified = getSquarifiedTreeMap(fixedFolder.data, state, mapSizeResolutionScaling, maxWidth)
|
|
77
79
|
|
|
78
80
|
for (const squarifiedNode of squarified.treeMap.descendants()) {
|
|
79
81
|
// squarified.width/height is a sum of the fixedPosition.width/height and applied margins
|
|
@@ -119,6 +121,7 @@ function buildSquarifiedTreeMapsForFixedFolders(
|
|
|
119
121
|
squarifiedNode.y0,
|
|
120
122
|
heightScale,
|
|
121
123
|
maxHeight,
|
|
124
|
+
maxWidth,
|
|
122
125
|
isDeltaState,
|
|
123
126
|
mapSizeResolutionScaling
|
|
124
127
|
)
|
|
@@ -150,7 +153,7 @@ function scaleRoot(root: Node, scaleLength: number, scaleWidth: number) {
|
|
|
150
153
|
root.length *= scaleLength
|
|
151
154
|
}
|
|
152
155
|
|
|
153
|
-
function getSquarifiedTreeMap(map: CodeMapNode, state: State, mapSizeResolutionScaling: number): SquarifiedTreeMap {
|
|
156
|
+
function getSquarifiedTreeMap(map: CodeMapNode, state: State, mapSizeResolutionScaling: number, maxWidth: number): SquarifiedTreeMap {
|
|
154
157
|
const hierarchyNode = hierarchy(map)
|
|
155
158
|
const nodesPerSide = getEstimatedNodesPerSide(hierarchyNode)
|
|
156
159
|
const padding = state.dynamicSettings.margin * PADDING_SCALING_FACTOR * mapSizeResolutionScaling
|
|
@@ -216,7 +219,11 @@ function getSquarifiedTreeMap(map: CodeMapNode, state: State, mapSizeResolutionS
|
|
|
216
219
|
return padding
|
|
217
220
|
})
|
|
218
221
|
|
|
219
|
-
return {
|
|
222
|
+
return {
|
|
223
|
+
treeMap: treeMap(hierarchyNode.sum(node => calculateAreaValue(node, state, maxWidth) * mapSizeResolutionScaling)),
|
|
224
|
+
height,
|
|
225
|
+
width
|
|
226
|
+
}
|
|
220
227
|
}
|
|
221
228
|
|
|
222
229
|
function getEstimatedNodesPerSide(hierarchyNode: HierarchyNode<CodeMapNode>) {
|
|
@@ -241,7 +248,7 @@ function isOnlyVisibleInComparisonMap(node: CodeMapNode, dynamicSettings: Dynami
|
|
|
241
248
|
}
|
|
242
249
|
|
|
243
250
|
// Only exported for testing.
|
|
244
|
-
export function calculateAreaValue(node: CodeMapNode, { dynamicSettings }: State) {
|
|
251
|
+
export function calculateAreaValue(node: CodeMapNode, { dynamicSettings, appSettings }: State, maxWidth: number) {
|
|
245
252
|
if (node.isExcluded) {
|
|
246
253
|
return 0
|
|
247
254
|
}
|
|
@@ -251,7 +258,7 @@ export function calculateAreaValue(node: CodeMapNode, { dynamicSettings }: State
|
|
|
251
258
|
}
|
|
252
259
|
|
|
253
260
|
if (isLeaf(node) && node.attributes?.[dynamicSettings.areaMetric]) {
|
|
254
|
-
return node.attributes[dynamicSettings.areaMetric]
|
|
261
|
+
return appSettings.invertArea ? maxWidth - node.attributes[dynamicSettings.areaMetric] : node.attributes[dynamicSettings.areaMetric]
|
|
255
262
|
}
|
|
256
263
|
return 0
|
|
257
264
|
}
|
|
@@ -48,7 +48,7 @@ describe("TreeMapHelper", () => {
|
|
|
48
48
|
state.dynamicSettings.margin = 15
|
|
49
49
|
state.dynamicSettings.heightMetric = "theHeight"
|
|
50
50
|
state.appSettings.invertHeight = false
|
|
51
|
-
state.dynamicSettings.focusedNodePath =
|
|
51
|
+
state.dynamicSettings.focusedNodePath = []
|
|
52
52
|
})
|
|
53
53
|
|
|
54
54
|
function buildNode() {
|
|
@@ -117,7 +117,7 @@ describe("TreeMapHelper", () => {
|
|
|
117
117
|
})
|
|
118
118
|
|
|
119
119
|
it("should be visible if it's a children of the focused node path", () => {
|
|
120
|
-
state.dynamicSettings.focusedNodePath = "/root"
|
|
120
|
+
state.dynamicSettings.focusedNodePath = ["/root"]
|
|
121
121
|
expect(buildNode().visible).toBeTruthy()
|
|
122
122
|
})
|
|
123
123
|
|
|
@@ -144,7 +144,7 @@ export function isVisible(squaredNode: CodeMapNode, isNodeLeaf: boolean, state:
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
if (state.dynamicSettings.focusedNodePath.length > 0) {
|
|
147
|
-
return squaredNode.path.startsWith(state.dynamicSettings.focusedNodePath)
|
|
147
|
+
return squaredNode.path.startsWith(state.dynamicSettings.focusedNodePath[0])
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
return true
|
|
@@ -57,6 +57,7 @@ function initializeAppSettings(target: CustomConfig) {
|
|
|
57
57
|
edgeHeight: 0,
|
|
58
58
|
hideFlatBuildings: false,
|
|
59
59
|
invertHeight: false,
|
|
60
|
+
invertArea: false,
|
|
60
61
|
isAttributeSideBarVisible: false,
|
|
61
62
|
isLoadingFile: false,
|
|
62
63
|
isLoadingMap: false,
|
|
@@ -99,7 +100,7 @@ function initializeDynamicSettings(target: CustomConfig) {
|
|
|
99
100
|
colorMetric: "",
|
|
100
101
|
distributionMetric: "",
|
|
101
102
|
edgeMetric: "",
|
|
102
|
-
focusedNodePath:
|
|
103
|
+
focusedNodePath: [],
|
|
103
104
|
heightMetric: "",
|
|
104
105
|
margin: 0,
|
|
105
106
|
searchPattern: "",
|