Skip to content

Commit adbac02

Browse files
committed
update comments about v2 changes that moved to another major
1 parent 997946b commit adbac02

File tree

18 files changed

+24
-24
lines changed

18 files changed

+24
-24
lines changed

src/components/annotations/click.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ function getToggleSets(gd, hoverData) {
130130
return {on: onSet, off: offSet, explicitOff: explicitOffSet};
131131
}
132132

133-
// to handle log axes until v2
133+
// to handle log axes until v3
134134
function clickData2r(d, ax) {
135135
return ax.type === 'log' ? ax.l2r(d) : ax.d2r(d);
136136
}

src/components/annotations/convert_coords.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var toLogRange = require('../../lib/to_log_range');
1616
* convertCoords: when converting an axis between log and linear
1717
* you need to alter any annotations on that axis to keep them
1818
* pointing at the same data point.
19-
* In v2.0 this will become obsolete
19+
* In v3.0 this will become obsolete
2020
*
2121
* gd: the plot div
2222
* ax: the axis being changed

src/components/colorscale/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ var letterAttrs = ['min', 'max', 'mid', 'auto'];
5050
/**
5151
* Extract 'c' / 'z', trace / color axis colorscale options
5252
*
53-
* Note that it would be nice to replace all z* with c* equivalents in v2
53+
* Note that it would be nice to replace all z* with c* equivalents in v3
5454
*
5555
* @param {object} cont : attribute container
5656
* @return {object}:

src/components/images/convert_coords.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var toLogRange = require('../../lib/to_log_range');
1616
* convertCoords: when converting an axis between log and linear
1717
* you need to alter any images on that axis to keep them
1818
* pointing at the same data point.
19-
* In v2.0 this will become obsolete (or perhaps size will still need conversion?)
19+
* In v3.0 this will become obsolete (or perhaps size will still need conversion?)
2020
* we convert size by declaring that the maximum extent *in data units* should be
2121
* the same, assuming the image is anchored by its center (could remove that restriction
2222
* if we think it's important) even though the actual left and right values will not be

src/components/legend/defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) {
9999
} else {
100100
// maybe use y=1.1 / yanchor=bottom as above
101101
// to avoid https://github.com/plotly/plotly.js/issues/1199
102-
// in v2
102+
// in v3
103103
defaultY = -0.1;
104104
defaultYAnchor = 'top';
105105
}

src/components/shapes/defaults.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) {
8181
var dflt0 = 0.25;
8282
var dflt1 = 0.75;
8383

84-
// hack until V2.0 when log has regular range behavior - make it look like other
84+
// hack until V3.0 when log has regular range behavior - make it look like other
8585
// ranges to send to coerce, then put it back after
8686
// this is all to give reasonable default position behavior on log axes, which is
8787
// a pretty unimportant edge case so we could just ignore this.

src/components/shapes/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var Lib = require('../../lib');
1818
// so these have to be specified in terms of the category serial numbers,
1919
// but can take fractional values. Other axis types we specify position based on
2020
// the actual data values.
21-
// TODO: in V2.0 (when log axis ranges are in data units) range and shape position
21+
// TODO: in V3.0 (when log axis ranges are in data units) range and shape position
2222
// will be identical, so rangeToShapePosition and shapePositionToRange can be
2323
// removed entirely.
2424

src/plot_api/plot_config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var configAttributes = {
126126
dflt: false,
127127
description: [
128128
'Determines whether to change the layout size when window is resized.',
129-
'In v2, this option will be removed and will always be true.'
129+
'In v3, this option will be removed and will always be true.'
130130
].join(' ')
131131
},
132132
fillFrame: {

src/plots/cartesian/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
var strTranslate = require('../../lib').strTranslate;
1313

14-
// in v2 (once log ranges are fixed),
14+
// in v3 (once log ranges are fixed),
1515
// we'll be able to p2r here for all axis types
1616
function p2r(ax, v) {
1717
switch(ax.type) {

src/plots/cartesian/select.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,9 @@ function prepSelect(e, startX, startY, dragOptions, mode) {
355355
}
356356

357357
if(clickmode === 'event') {
358-
// TODO: remove in v2 - this was probably never intended to work as it does,
358+
// TODO: remove in v3 - this was probably never intended to work as it does,
359359
// but in case anyone depends on it we don't want to break it now.
360-
// Note that click-to-select introduced pre v2 also emitts proper
360+
// Note that click-to-select introduced pre v3 also emitts proper
361361
// event data when clickmode is having 'select' in its flag list.
362362
gd.emit('plotly_selected', undefined);
363363
}

src/plots/cartesian/set_convert.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ function isValidCategory(v) {
5858
* - category: calcdata format (c), and will stay that way because
5959
* the data format has no continuous mapping
6060
* - log: linearized (l) format
61-
* TODO: in v2.0 we plan to change it to data format. At that point
61+
* TODO: in v3.0 we plan to change it to data format. At that point
6262
* shapes will work the same way as ranges, tick0, and annotations
6363
* so they can use this conversion too.
6464
*
@@ -95,7 +95,7 @@ module.exports = function setConvert(ax, fullLayout) {
9595
if((opts || {}).msUTC && isNumeric(v)) {
9696
// For now it is only used
9797
// to fix bar length in milliseconds & gl3d ticks
98-
// It could be applied in other places in v2
98+
// It could be applied in other places in v3
9999
return +v;
100100
}
101101

src/plots/plots.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ function getFormatObj(gd, formatKeys) {
695695
/**
696696
* getFormatter: combine the final separators with the locale formatting object
697697
* we pulled earlier to generate number and time formatters
698-
* TODO: remove separators in v2, only use locale, so we don't need this step?
698+
* TODO: remove separators in v3, only use locale, so we don't need this step?
699699
*
700700
* @param {object} formatObj: d3.locale format object
701701
* @param {string} separators: length-2 string to override decimal and thousands
@@ -1496,7 +1496,7 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) {
14961496
// layouts with no set width and height were set temporary set to 'initial'
14971497
// to pass through the autosize routine
14981498
//
1499-
// This behavior is subject to change in v2.
1499+
// This behavior is subject to change in v3.
15001500
coerce('autosize', !(layoutIn.width && layoutIn.height));
15011501

15021502
coerce('width');

src/traces/splom/attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ module.exports = {
101101
].join(' ')
102102
},
103103

104-
// TODO make 'true' the default in v2?
104+
// TODO make 'true' the default in v3?
105105
matches: {
106106
valType: 'boolean',
107107
dflt: false,

test/jasmine/tests/axes_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3857,7 +3857,7 @@ describe('Test axes', function() {
38573857
var dates = [[2000, 0, 1], [2001, 0, 1], [2002, 0, 1]]
38583858
.map(function(d) { return new Date(d[0], d[1], d[2]).getTime(); });
38593859

3860-
// We could make this work down the road (in v2),
3860+
// We could make this work down the road (in v3),
38613861
// when address our timezone problems.
38623862
var out = _makeCalcdata({
38633863
x: new Float64Array(dates)

test/jasmine/tests/histogram_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1110,7 +1110,7 @@ describe('Test histogram', function() {
11101110

11111111
it('should update autobins correctly when restyling', function(done) {
11121112
// note: I'm *not* testing what this does to gd.data, as that's
1113-
// really a matter of convenience and will perhaps change later (v2?)
1113+
// really a matter of convenience and will perhaps change later (v3?)
11141114
var data1 = [1.5, 2, 2, 3, 3, 3, 4, 4, 5];
11151115
Plotly.newPlot(gd, [{x: data1, type: 'histogram' }])
11161116
.then(function() {

test/jasmine/tests/plot_api_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ describe('Test plot api', function() {
121121
// some of these tests use the undo/redo queue
122122
// OK, this is weird... the undo/redo queue length is a global config only.
123123
// It's ignored on the plot, even though the queue itself is per-plot.
124-
// We may ditch this later, but probably not until v2
124+
// We may ditch this later, but probably not until v3
125125
Plotly.setPlotConfig({queueLength: 3});
126126
});
127127

@@ -447,7 +447,7 @@ describe('Test plot api', function() {
447447
.then(function() {
448448
// Ideally we should change this to xaxis.autorange: 'reversed'
449449
// but that's a weird disappearing setting used just to force
450-
// an initial reversed autorange. Proposed v2 change at:
450+
// an initial reversed autorange. Proposed v3 change at:
451451
// https://github.com/plotly/plotly.js/issues/420#issuecomment-323435082
452452
return Plotly.relayout(gd, 'xaxis.reverse', true);
453453
})
@@ -1100,7 +1100,7 @@ describe('Test plot api', function() {
11001100
// some of these tests use the undo/redo queue
11011101
// OK, this is weird... the undo/redo queue length is a global config only.
11021102
// It's ignored on the plot, even though the queue itself is per-plot.
1103-
// We may ditch this later, but probably not until v2
1103+
// We may ditch this later, but probably not until v3
11041104
Plotly.setPlotConfig({queueLength: 3});
11051105
});
11061106

test/jasmine/tests/select_test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function assertEventCounts(selecting, selected, deselect, msg) {
115115
expect(deselectCnt).toBe(deselect, 'plotly_deselect call count: ' + msg);
116116
}
117117

118-
// TODO: in v2, when we get rid of the `plotly_selected->undefined` event, these will
118+
// TODO: in v3, when we get rid of the `plotly_selected->undefined` event, these will
119119
// change to BOXEVENTS = [1, 1, 1], LASSOEVENTS = [4, 1, 1]. See also _run down below
120120
//
121121
// events for box or lasso select mouse moves then a doubleclick
@@ -1837,7 +1837,7 @@ describe('Test select box and lasso per trace:', function() {
18371837
return (eventCounts[0] ? selectedPromise : Promise.resolve())
18381838
.then(afterDragFn)
18391839
.then(function() {
1840-
// TODO: in v2 when we remove the `plotly_selecting->undefined` the Math.max(...)
1840+
// TODO: in v3 when we remove the `plotly_selecting->undefined` the Math.max(...)
18411841
// in the middle here will turn into just eventCounts[1].
18421842
// It's just here because one of the selected events is generated during
18431843
// doubleclick so hasn't happened yet when we're testing this.

test/jasmine/tests/shapes_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('Test shapes defaults:', function() {
114114
expect(shape1Out.x0).toBe(5);
115115
expect(shape1Out.x1).toBe(15);
116116

117-
// shapes use data values for log axes (like everyone will in V2.0)
117+
// shapes use data values for log axes (like everyone will in V3.0)
118118
expect(shape1Out.y0).toBeWithin(100, 0.001);
119119
expect(shape1Out.y1).toBeWithin(10000, 0.001);
120120

0 commit comments

Comments
 (0)