Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Label over hovered building not shown for height Metric value of… #1690

Merged
merged 12 commits into from
Feb 8, 2021

Conversation

Shivan-997
Copy link
Contributor

@Shivan-997 Shivan-997 commented Jan 22, 2021

… zero #1623

Hovering some leaves does not show a temporary label

Please read the CONTRIBUTING.md before opening a PR.

Closes: #1623

Description

codeMapLabelService should add label even if node has a height attribute value of 0.
Notes: There is no Bug in Multiple Mode because we have found that in multiple mode there must be common metrics in order to be visualize the multiple "maps".

Screenshots or gifs

Screenshot 2021-01-22 at 13 24 09

Copy link
Collaborator

@ce-bo ce-bo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % comments

@@ -16,6 +16,7 @@ export class ThreeCameraService implements CameraChangeSubscriber, CameraSubscri
private readonly throttledCameraChange: () => void

camera: PerspectiveCamera
threeCameraService: jest.Mock
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mock in a regular service? Is that intentional?

@@ -136,6 +136,7 @@
"angularjs-color-picker": "^3.4.8",
"babel-loader": "^8.1.0",
"bestzip": "^2.1.5",
"canvas": "^2.6.1",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it intentional that this is added? I can't find any usage in this code?

}
labelText += `${node.attributes[state.dynamicSettings.heightMetric]} ${state.dynamicSettings.heightMetric}`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we safe that node.attributes is indeed an object? We originally had a safeguard at the top (node.attributes?.).

Comment on lines +85 to +87
// !remark : algorithm scaling is not same as the squarified layout,
// !layout offset needs to be scaled down,the divided by value is just empirical,
// TODO !needs further investigation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might find a nicer description here but I can't think of anything right now :)

sprite.scale.set((distance / this.LABEL_WIDTH_DIVISOR) * labelWidth, distance / 25, 1)
} else {
sprite.scale.set((distance / this.LABEL_WIDTH_DIVISOR) * labelWidth, distance / this.LABEL_HEIGHT_DIVISOR, 1)
if (this.threeCameraService.camera) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this check not necessary before?

@ce-bo ce-bo merged commit 2de205b into main Feb 8, 2021
@ce-bo ce-bo deleted the fix/1623/fix-missing-temporary-label branch February 8, 2021 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hovering some leaves does not show a temporary label
4 participants