Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e506f43

Browse filesBrowse files
committed
Add test that reproduces bug
1 parent cf6e5db commit e506f43
Copy full SHA for e506f43

File tree

Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed

‎test/jasmine/tests/axes_test.js

Copy file name to clipboardExpand all lines: test/jasmine/tests/axes_test.js
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1796,6 +1796,25 @@ describe('Test axes', function() {
17961796
'input range, ' + msg + ': ' + ax.range);
17971797
}
17981798

1799+
it('can change _inputDomain on call to react when template is present', function(done) {
1800+
Plotly.newPlot(gd,
1801+
[{z: [[0, 1], [2, 3]], type: 'heatmap'}],
1802+
{ template: {}, xaxis: { domain: [0,1], scaleanchor: 'y' } }
1803+
).then(function() {
1804+
assertRangeDomain('xaxis', [-1.451851851851852,2.4518518518518517], [0, 1], [0, 1]);
1805+
})
1806+
.then(function() {
1807+
return Plotly.react(gd,
1808+
[{z: [[0, 1], [2, 3]], type: 'heatmap'}],
1809+
{ template: {}, xaxis: { domain: [0.1, 0.9] } }
1810+
);
1811+
})
1812+
.then(function() {
1813+
assertRangeDomain('xaxis', [-0.5,1.5], [0.1, 0.9], [0.1, 0.9]);
1814+
})
1815+
.then(done, done.fail);
1816+
});
1817+
17991818
it('can change per-axis constrain:domain/range and constraintoward', function(done) {
18001819
Plotly.newPlot(gd,
18011820
// start with a heatmap as it has no padding so calculations are easy

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.