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

Master Thesis - Node Scaling - Code Review #59

Open
wants to merge 96 commits into
base: main
Choose a base branch
from

Conversation

Skgland
Copy link
Contributor

@Skgland Skgland commented Feb 16, 2022

This PR is for the review of the code produced during my master thesis

probably slightly less efficient due to eager evaluation instead of short circuiting, but easier to read
apparently parentRendering can be undefined sometimes

workaround rather than fix as the field is not supposed to be undefined,
so this just suppresses the symptom rather than solving the source
TODO:
* hide labels, comments etc.
* adjust edges
* make sure not to overlap siblings
based on the comment on SKGraphElement SKNode and SKEdge should have this superclass
neither depends on the DepthMap and both operate on Region so it makes more sense to have them there

also marks DepthMap fields as private and reduces type requirement from KNode to KShapeELement as that is sufficient for a Regions boundingRectangle
still require the title height to scale the node accordingly
and thus require the DepthMap and thus UseSmartZoom
…imum scale"

This reverts commit 5b9cb2f.

This revert requires some adjustments to node scaling for that to continue working as intended

# Conflicts:
#	packages/klighd-core/src/options/render-options-registry.ts
#	packages/klighd-core/src/views-rendering.tsx
also we only need to know the dimensions of the parent
packages/klighd-core/src/hierarchy/depth-map.ts Outdated Show resolved Hide resolved
packages/klighd-core/src/views.tsx Outdated Show resolved Hide resolved
packages/klighd-core/src/views.tsx Outdated Show resolved Hide resolved
…equal

this helps when node scaling and title scaling are set to the same target scale.
if a node is already scaled to the target scale the title in it should not need scaling, but due to imprecisions in floating point numbers they would attempt to scale anyway, causing a background to be added unnecessarily
# Conflicts:
#	packages/klighd-core/src/depth-map.ts
#	packages/klighd-core/src/skgraph-models.ts
#	packages/klighd-core/src/views-rendering.tsx
#	packages/klighd-core/src/views.tsx
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.

3 participants