Skip to content

Commit 2ada05d

Browse files
committed
test that autosize:true respects max-width and max-height
1 parent 1bdffcd commit 2ada05d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/jasmine/tests/config_test.js

+11
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,17 @@ describe('config argument', function() {
163163
testAutosize(autosize, config, layoutHeight, relayoutHeight, done);
164164
});
165165

166+
it('should fill the container when autosize: true up its max-width and max-height', function(done) {
167+
gd.style.maxWidth = '400px';
168+
gd.style.maxHeight = '300px';
169+
Plotly.plot(gd, data, {autosize: true})
170+
.then(function() {
171+
checkLayoutSize(400, 300);
172+
})
173+
.catch(failTest)
174+
.then(done);
175+
});
176+
166177
it('should respect attribute autosizable: false', function(done) {
167178
var autosize = false;
168179
var config = {

0 commit comments

Comments
 (0)