10000 Axes.draw w/o getBoundingClientRect + many axis automargin fixes by etpinard · Pull Request #4165 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Axes.draw w/o getBoundingClientRect + many axis automargin fixes #4165

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

Merged
merged 15 commits into from
Sep 6, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

8000
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
draw in shapes, images and annotations in drawData only
- need to draw them (again) in finalDraw,
  by the time we get to drawData we have the correct
  auto-margin and auto-range info required to draw them
  correctly!
  • Loading branch information
etpinard committed Sep 4, 2019
commit 2a9bbee15b036b8734f36769d43b2bf5f0b93431
7 changes: 3 additions & 4 deletions src/plot_api/subroutines.js
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,11 @@ exports.drawData = function(gd) {
// styling separate from drawing
Plots.style(gd);

// show annotations and shapes
// draw components that can be drawn on axes,
// and that do not push the margins
Registry.getComponentMethod('shapes', 'draw')(gd);
Registry.getComponentMethod('annotations', 'draw')(gd);
Registry.getComponentMethod('images', 'draw')(gd);

// Mark the first render as complete
fullLayout._replotting = false;
Expand Down Expand Up @@ -717,9 +719,6 @@ exports.doAutoRangeAndConstraints = function(gd) {
// correctly sized and the whole plot re-margined. fullLayout._replotting must
// be set to false before these will work properly.
exports.finalDraw = function(gd) {
Registry.getComponentMethod('shapes', 'draw')(gd);
Registry.getComponentMethod('images', 'draw')(gd);
Registry.getComponentMethod('annotations', 'draw')(gd);
// TODO: rangesliders really belong in marginPushers but they need to be
// drawn after data - can we at least get the margin pushing part separated
// out and done earlier?
Expand Down
295B
0