Skip to content

Commit da30f16

Browse files
committed
remove setScale categories fallback and update heatmap test comment
1 parent 177e6f0 commit da30f16

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/plots/cartesian/set_convert.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,11 +419,6 @@ module.exports = function setConvert(ax, fullLayout) {
419419
ax.setScale = function(usePrivateRange) {
420420
var gs = fullLayout._size;
421421

422-
// TODO cleaner way to handle this case
423-
if(!ax._categories) ax._categories = [];
424-
// Add a map to optimize the performance of category collection
425-
if(!ax._categoriesMap) ax._categoriesMap = {};
426-
427422
// make sure we have a domain (pull it in from the axis
428423
// this one is overlaying if necessary)
429424
if(ax.overlaying) {

test/jasmine/tests/heatmap_test.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,8 +298,10 @@ describe('heatmap calc', function() {
298298

299299
fullTrace._extremes = {};
300300

301-
// clearCalc used to be (oddly enough) part of supplyDefaults.
302-
// Now it's in doCalcData, which we don't include in this partial pathway.
301+
// we used to call ax.setScale during supplyDefaults, and this had a
302+
// fallback to provide _categories and _categoriesMap. Now neither of
303+
// those is true... anyway the right way to do this though is
304+
// ax.clearCalc.
303305
fullLayout.xaxis.clearCalc();
304306
fullLayout.yaxis.clearCalc();
305307

0 commit comments

Comments
 (0)