Skip to content

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

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 26 commits into from
Jun 9, 2016
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f1415f8
autosize: Remove unnecessary guard in plotAutoSize
n-riesco May 25, 2016
3a2c547
autosize: remove internal option 'initial'
n-riesco May 27, 2016
f9140b0
autosize: update baseline image `ternary_simple`
n-riesco May 27, 2016
206888b
test: make `toimage_test.js` stricter
n-riesco May 27, 2016
9c2a0d9
test: add test for issue #537
n-riesco May 27, 2016
53d4b90
test: autosize sets size of main SVG
n-riesco Jun 1, 2016
61aa240
test: supplyDefaults accepts plain objects
n-riesco Jun 1, 2016
a334254
autosize: supplyDefaults accepts plain objects
n-riesco Jun 1, 2016
7815efe
test: autosize, fillFrame and frameMargins
n-riesco Jun 1, 2016
7e95d93
autosize: respect config.autosizable
n-riesco Jun 1, 2016
370ad8b
test: config.autosizable
n-riesco Jun 1, 2016
46d7af5
autosize: supplyDefaults accepts plain objects
n-riesco Jun 1, 2016
94f450a
test: account for default autosizable being false
n-riesco Jun 1, 2016
b286469
Merge branch 'master' into remove-autosize-initial
n-riesco Jun 7, 2016
49bb2cf
autosize: use Lib.isPlotDiv(gd)
n-riesco Jun 7, 2016
0c316ba
autosize: expand description of config.autosizable
n-riesco Jun 7, 2016
3ed69b1
autosize: revert change of variable name
n-riesco Jun 7, 2016
862578e
autosize: fix condition to call sanitizeMargins
n-riesco Jun 7, 2016
172d81d
autosize: restore backwards-compatibility with v1
n-riesco Jun 7, 2016
42a3ed0
test: autosize is backwards-compatible
n-riesco Jun 7, 2016
de69b3d
test: supplyDefaults calls sanitizeMargins once
n-riesco Jun 7, 2016
ada5323
lib: ensure isPlotDiv accepts plain objects
n-riesco Jun 7, 2016
bc1a970
test: Lib.isPlotLib accepts plain objects
n-riesco Jun 7, 2016
6021c43
autosize: use Lib.isPlotDiv
n-riesco Jun 7, 2016
e822ff7
autosize: ensure sanitizeMargins is called once
n-riesco Jun 7, 2016
fbc01c3
autosize: change attribute valType to boolean
n-riesco Jun 9, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions test/jasmine/tests/plot_api_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -786,4 +786,29 @@ describe('Test plot api', function() {
expect(gd.data[1].contours).toBeUndefined();
});
});

describe('Plotly.newPlot', function() {
var gd;

beforeEach(function() {
gd = createGraphDiv();
});

afterEach(destroyGraphDiv);

it('should respect layout.width and layout.height', function(done) {

// See issue https://github.com/plotly/plotly.js/issues/537
var data = [{
x: [1, 2],
y: [1, 2]
}];

Plotly.plot(gd, data).then(function() {
Plotly.newPlot(gd, data, { height: 50 }).then(function() {
expect(gd._fullLayout.height).toBe(50);
Copy link
Contributor

Choose a reason for hiding this comment

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

we should also check to svg attributes too to make sure that it updated properly.

}).then(done);
});
});
});
});