Skip to content

Commit 7bde3b7

Browse files
committed
Add test case (image scaleanchor removal)
1 parent 2653067 commit 7bde3b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/jasmine/tests/image_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,14 @@ describe('image smart layout defaults', function() {
209209
expect(gd._fullLayout.yaxis.scaleanchor).toBe('x');
210210
});
211211

212+
it('should NOT set scaleanchor if asked not to', function() {
213+
gd = {};
214+
gd.data = [{type: 'image', z: [[[255, 0, 0]]]}];
215+
gd.layout = {yaxis: {scaleanchor: false}};
216+
supplyAllDefaults(gd);
217+
expect(gd._fullLayout.yaxis.scaleanchor).toBe(false);
218+
});
219+
212220
it('should NOT reset scaleanchor if it\'s already defined', function() {
213221
gd.data = [{type: 'image', z: [[[255, 0, 0]]]}, {y: [5, 3, 2], xaxis: 'x3'}];
214222
gd.layout = {yaxis: {scaleanchor: 'x3'}};

0 commit comments

Comments
 (0)