Skip to content

Remove internal option layout.autosize='initial' (Fixes #537) #576

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

Closed
wants to merge 5 commits into from

Conversation

n-riesco
Copy link
Contributor

  • Moved initial call to plotAutoSize into Plots.supplyDefaults(gd).
  • Replaced { autosize: 'initial' } with the flag
    gd._fullLayout._initialAutoSizeIsDone.
  • { autosize: false } the values of width and height undefined in
    gd.layout will be autosized only once.
  • { autosize: true } only autosizes the values of width and height
    undefined in gd.layout.

Fixes #537

n-riesco added 5 commits May 25, 2016 10:34
* Commit 5df675a (fix demo/outside legend bug and null data autoscale
  bug) introduced a guard in plotAutoSize to avoid calling layoutStyles
  while autosize is set to 'initial'.

* Commit ee974d9 (autosizing in shareplots, autosize aspect ratio
  restrictions and ...) removed the call to layoutStyles but forgot to
  remove the guard.

* This commit removes the guard.

* Checked that all the jasmine and image tests still pass.
* Moved initial call to `plotAutoSize` into `Plots.supplyDefaults(gd)`.

* Replaced `{ autosize: 'initial' }` with the flag
  `gd._fullLayout._initialAutoSizeIsDone`.

* `{ autosize: false }` the values of width and height undefined in
  `gd.layout` will be autosized only once.

* `{ autosize: true }` only autosizes the values of width and height
  undefined in `gd.layout`.

Fixes plotly#537
* Previous image didn't honour the width and height set in the layout.
* Added test to check `Plotly.newPlot` respects `layout.width` and
  `layout.height`.
@n-riesco n-riesco changed the title Remove internal option { autosize: 'initial' } (Fixes #537) Remove internal option layout.autosize='initial' (Fixes #537) May 27, 2016
@n-riesco n-riesco closed this May 27, 2016
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.

1 participant