Skip to content

Commit

Permalink
Add some todos, Apply format/code style #1491
Browse files Browse the repository at this point in the history
  • Loading branch information
ce-bo committed Nov 28, 2020
1 parent a543d78 commit 81df684
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/)

### Added 🚀

- Added regression test
- Add the folder name onto the floor on the first 3 layers to get a better overview of the map ([#1491](https://github.com/MaibornWolff/codecharta/issues/1491))
- UX Improvements related to labels allowing for user interaction #1404
- Labels can be hovered, hovering their corresponding node
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,8 @@ export class BoxGeometryGenerationHelper {
data.addFace(indexBottomLeft, indexTopRight, indexTopLeft)
data.addFace(indexBottomLeft, indexBottomRight, indexTopRight)
} else {
// Collect floors from a depth of 1 until a depth of 3 to be stamped with the folder name as a label
// We skip the root folder because it makes no sense to label it.
// Collect floors from a depth of 0 until a depth of 3 to be stamped with the folder name as a label
// TODO provide conditions centrally for checking if a floor has to be labeled.
if (addingFloor && side === sides.top && node.mapNodeDepth >= 0 && node.mapNodeDepth < 3) {
data.saveFloorSurfaceInformation(node, minPos, maxPos)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ export class GeometryGenerator {
context.textBaseline = "middle"

// consider font size for y position
// TODO fontSizeForNodeDepth is the wrong font size to consider
// we must use the scaled font size instead.
const textPositionY = textCanvas.height - fontSizeForNodeDepth / 2
const textPositionX = textCanvas.width / 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class ThreeSceneService implements CodeMapPreRenderServiceSubscriber {
}

highlightBuildingsAfterSelect() {
// TODO dead code? Remove it please.
const state = this.storeService.getState()
this.getMapMesh().highlightBuilding(this.highlighted, this.selected, state, this.constantHighlight)
}
Expand Down Expand Up @@ -101,6 +102,8 @@ export class ThreeSceneService implements CodeMapPreRenderServiceSubscriber {
}

private resetMaterial(materials: Material[]) {
// TODO activate the function when the performance issue in updateCorrectMaterial() has been fixed.
return
const allNodes = this.mapMesh.getNodes()
for (const node of allNodes) {
for (const material of materials) {
Expand Down
4 changes: 2 additions & 2 deletions visualization/app/codeCharta/util/treeMapGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { getMapResolutionScaleFactor } from "../ui/codeMap/codeMap.render.servic
export type SquarifiedTreeMap = { treeMap: HierarchyRectangularNode<CodeMapNode>; height: number; width: number }

const PADDING_SCALING_FACTOR = 0.4
const DEFAULT_PADDING_FLOOR_LABEL_FROM_LEVEL_1 = 120
const DEFAULT_PADDING_FLOOR_LABEL_FROM_LEVEL_2 = 95
const DEFAULT_PADDING_FLOOR_LABEL_FROM_LEVEL_1 = 120
const DEFAULT_PADDING_FLOOR_LABEL_FROM_LEVEL_2 = 95

export function createTreemapNodes(map: CodeMapNode, state: State, metricData: NodeMetricData[], isDeltaState: boolean) {
const mapSizeResolutionScaling = getMapResolutionScaleFactor(state.files)
Expand Down

0 comments on commit 81df684

Please sign in to comment.