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 for tweaking visible attribute of treemap pathbar #4516

Merged
merged 2 commits into from
Jan 27, 2020

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jan 23, 2020

Fixes #4515

@nicolaskruchten
@alexcjohnson
cc: @plotly/plotly_js

- add test to show/hide pathbar using react
@archmoj archmoj added bug something broken status: reviewable labels Jan 23, 2020
@@ -103,6 +103,10 @@ function plotOne(gd, cd, element, transitionOpts) {
return;
}

if(!trace.pathbar.visible) {
selAncestors.remove();
}
Copy link
Contributor

@etpinard etpinard Jan 27, 2020

Choose a reason for hiding this comment

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

It's probably cleaner to move this below from

if(trace.pathbar.visible) {
drawAncestors(gd, cd, entry, selAncestors, {
barDifY: barDifY,
width: barW,
height: barH,
viewX: viewBarX,
viewY: viewBarY,
pathSlice: pathAncestor,
toMoveInsideSlice: toMoveInsideSlice,
makeUpdateSliceInterpolator: makeUpdateSliceInterpolator,
makeUpdateTextInterpolator: makeUpdateTextInterpolator,
handleSlicesExit: handleSlicesExit,
hasTransition: hasTransition,
strTransform: strTransform
});
}

as

if(trace.pathbar.visible) {
  // ...
} else {
   selAncestors.remove();
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good call. Done in 838d1c3.

@etpinard
Copy link
Contributor

💃 - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

treemap pathbar visibility not reacting
2 participants