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

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

Merged
merged 15 commits into from
Sep 6, 2019

Commits on Sep 4, 2019

  1. 🔪 useless axis mocking in polar

    ... we no longer need to do this since the
       Axes.doTicks -> Axes.drawOne refactor
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    93ef043 View commit details
    Browse the repository at this point in the history
  2. 🔪 obsolete geocontainer purge call

    ... this thing is has not been used since we
        move geo subplot to `fullLayout._paper` layer.
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    e907b9f View commit details
    Browse the repository at this point in the history
  3. use Plots.previousPromises in lsInner

    ... to make `lsInner` more similar with other async subroutines.
        This patch has no effect on the behavior.
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    0cf93f8 View commit details
    Browse the repository at this point in the history
  4. 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!
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    2a9bbee View commit details
    Browse the repository at this point in the history
  5. add four failing axis automargin mocks

    - two showing problems with `ax.mirror`
    - one showing problems with multiline axis titles
    - one showing with long tilted labels + rangeslider
    
    ... added with 1.49.4 failing baselines
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    d54ec94 View commit details
    Browse the repository at this point in the history
  6. add outside ticks to multicategory2 mock

    ... to show divider span bug, update baseline using 1.49.4
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    a7e8eaf View commit details
    Browse the repository at this point in the history
  7. add spikeline tests

    - covering cases where `ax._subplotsWith.length > 1`
      and ax in question isn't at extremity of graph
    - covering cases for `anchor:'free'` axes
    - make other test use `Plotly.plot` instead of `newPlot`,
      to not purge the graph twice.
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    16542f3 View commit details
    Browse the repository at this point in the history
  8. rename titleOffset -> Axes.getPxPosition

    ... which is a more appropriate name.
        Moreover, improve its perf by using
        _anchorAxis cache instead of `getFromId`
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    9781e8c View commit details
    Browse the repository at this point in the history
  9. use Axes.getPxPosition instead of ax._boundingBox

    ... to position cartesian spike edges. This allows us to not
        have to compute the axis bounding box to render the spikes.
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    2e7b3dd View commit details
    Browse the repository at this point in the history
  10. replace ax._counterSpan with ax._counterDomain(Min|Max)

    ... which can be computed before ax.setScale()
    
    - This speeds up Axes.drawOne (e.g. for drag interactions)
    - rangeslider requires one less loop over the counter axes
    - make Fx.hover not have to depend on field computed in Axes.drawOne
    - ax._counterDomain(Min|Max) will also be used for mirror auto-margin
      computations
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    9ebbd57 View commit details
    Browse the repository at this point in the history
  11. resolve #1988 - 🔪 ax._boundingBox (!)

    - replace it with getLabelLevelBBox (an extension of getLabelLevelSpan),
      to compute axis margin push values. Use cache to not have to compute
      the (costly) label bounding boxes unnecessarily
    - compute ax._depth during Axes.drawOne, which is the measure in px
      between axis position and outward-most part of bounding box,
      we use this for (1) multicategory label, (2) axis title and (3)
      rangeslider positioning
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    d2650fe View commit details
    Browse the repository at this point in the history
  12. update baselines post 🔪 ax._boundingBox commit

    - some range slider baselines have a slightly bigger
      bottom margin
    - automargin-rangeslider-and-sidepush now has the correct
      side margin push (but is still missing its ax title)
    - multicategory2 now has the correct top margin push
      (but its dividers are not long enough)
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    ecc592c View commit details
    Browse the repository at this point in the history
  13. fix #2434 - handle ax.automargin + ax.mirror cases

    ... by registering a mirror-specific push-margin id.
    
    - Note that to handle the 'all' and 'allticks', we use
      ax._counterDomain(Min|Max) added previously.
    - both automargin-mirror* baselines are now correct
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    daa88e0 View commit details
    Browse the repository at this point in the history
  14. fix ax automargin for multi-line ax titles

    - automargin-multiline-titles and
      automargin-rangeslider-and-sidepush now push the
      bottom enough to make their axis title visible
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    40f1b24 View commit details
    Browse the repository at this point in the history
  15. fix multicategory label placement for outside tickson:labels

    - multicategory2 now has the correct divider length
    - some multicategory baselines are updated with
      more precise ax._depth, which tweaks the axis title positioning
    - multicategory_histograms and multicategory-sorting appear to
      have (very) slightly longer dividers
    etpinard committed Sep 4, 2019
    Configuration menu
    Copy the full SHA
    bb127af View commit details
    Browse the repository at this point in the history