Skip to content

Commit b60a7eb

Browse files
committed
check that an overlaying axis ignores its own domainpad
Give the overlaying axis in the domainpad test a conflicting domainpad, so the test covers the behavior that the attribute description now documents.
1 parent 4770ecf commit b60a7eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎test/jasmine/tests/axes_test.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8797,12 +8797,13 @@ describe('axis domainpad', () => {
87978797
height: 600,
87988798
margin: {l: 40, r: 20, t: 20, b: 40},
87998799
yaxis: {domain: [0, 1], domainpad: {top: 30}},
8800-
yaxis2: {overlaying: 'y', side: 'right'}
8800+
yaxis2: {overlaying: 'y', side: 'right', domainpad: {top: 5, bottom: 12}}
88018801
})
88028802
.then(() => {
88038803
const ya = gd._fullLayout.yaxis;
88048804
const ya2 = gd._fullLayout.yaxis2;
88058805

8806+
expect(ya._offset).toBeCloseTo(20 + 30, 2);
88068807
// the two have to end up on exactly the same plot area
88078808
expect(ya2._offset).toBeCloseTo(ya._offset, 2);
88088809
expect(ya2._length).toBeCloseTo(ya._length, 2);

0 commit comments

Comments
 (0)