Skip to content

Commit 5d31324

Browse files
committed
comment and fix on assertPlotSize with margin.pad
1 parent d02c76b commit 5d31324

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

test/jasmine/assets/custom_assertions.js

+4
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ exports.assertElemInside = function(elem, container, msg) {
220220
/*
221221
* quick plot area dimension check: test width and/or height of the inner
222222
* plot area (single subplot) to verify that the margins are as expected
223+
*
224+
* Note: if you use margin.pad on the plot, width and height will be larger
225+
* than you expected by twice that padding.
226+
*
223227
* opts can have keys (all optional):
224228
* width (exact width match)
225229
* height (exact height match)

test/jasmine/tests/legend_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ describe('legend relayout update', function() {
527527
it('should hide and show the legend', function(done) {
528528
var mockCopy = Lib.extendDeep({}, mock, {layout: {
529529
legend: {x: 1.1, xanchor: 'left'},
530-
margin: {l: 50, r: 50},
530+
margin: {l: 50, r: 50, pad: 0},
531531
width: 500
532532
}});
533533

0 commit comments

Comments
 (0)