From adbac024b256b3808cf35642bee88933decfcf69 Mon Sep 17 00:00:00 2001 From: archmoj Date: Fri, 15 Jan 2021 19:05:22 -0500 Subject: [PATCH] update comments about v2 changes that moved to another major --- src/components/annotations/click.js | 2 +- src/components/annotations/convert_coords.js | 2 +- src/components/colorscale/helpers.js | 2 +- src/components/images/convert_coords.js | 2 +- src/components/legend/defaults.js | 2 +- src/components/shapes/defaults.js | 2 +- src/components/shapes/helpers.js | 2 +- src/plot_api/plot_config.js | 2 +- src/plots/cartesian/helpers.js | 2 +- src/plots/cartesian/select.js | 4 ++-- src/plots/cartesian/set_convert.js | 4 ++-- src/plots/plots.js | 4 ++-- src/traces/splom/attributes.js | 2 +- test/jasmine/tests/axes_test.js | 2 +- test/jasmine/tests/histogram_test.js | 2 +- test/jasmine/tests/plot_api_test.js | 6 +++--- test/jasmine/tests/select_test.js | 4 ++-- test/jasmine/tests/shapes_test.js | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/components/annotations/click.js b/src/components/annotations/click.js index 0ad567b359f..dca70aaf1fd 100644 --- a/src/components/annotations/click.js +++ b/src/components/annotations/click.js @@ -130,7 +130,7 @@ function getToggleSets(gd, hoverData) { return {on: onSet, off: offSet, explicitOff: explicitOffSet}; } -// to handle log axes until v2 +// to handle log axes until v3 function clickData2r(d, ax) { return ax.type === 'log' ? ax.l2r(d) : ax.d2r(d); } diff --git a/src/components/annotations/convert_coords.js b/src/components/annotations/convert_coords.js index 33ba3d34aa1..83aee5442da 100644 --- a/src/components/annotations/convert_coords.js +++ b/src/components/annotations/convert_coords.js @@ -16,7 +16,7 @@ var toLogRange = require('../../lib/to_log_range'); * convertCoords: when converting an axis between log and linear * you need to alter any annotations on that axis to keep them * pointing at the same data point. - * In v2.0 this will become obsolete + * In v3.0 this will become obsolete * * gd: the plot div * ax: the axis being changed diff --git a/src/components/colorscale/helpers.js b/src/components/colorscale/helpers.js index 905292dd012..f87c4e5a88f 100644 --- a/src/components/colorscale/helpers.js +++ b/src/components/colorscale/helpers.js @@ -50,7 +50,7 @@ var letterAttrs = ['min', 'max', 'mid', 'auto']; /** * Extract 'c' / 'z', trace / color axis colorscale options * - * Note that it would be nice to replace all z* with c* equivalents in v2 + * Note that it would be nice to replace all z* with c* equivalents in v3 * * @param {object} cont : attribute container * @return {object}: diff --git a/src/components/images/convert_coords.js b/src/components/images/convert_coords.js index e8e91d95c5c..8fe81f2ef30 100644 --- a/src/components/images/convert_coords.js +++ b/src/components/images/convert_coords.js @@ -16,7 +16,7 @@ var toLogRange = require('../../lib/to_log_range'); * convertCoords: when converting an axis between log and linear * you need to alter any images on that axis to keep them * pointing at the same data point. - * In v2.0 this will become obsolete (or perhaps size will still need conversion?) + * In v3.0 this will become obsolete (or perhaps size will still need conversion?) * we convert size by declaring that the maximum extent *in data units* should be * the same, assuming the image is anchored by its center (could remove that restriction * if we think it's important) even though the actual left and right values will not be diff --git a/src/components/legend/defaults.js b/src/components/legend/defaults.js index 5a82715a3e5..8c481dae849 100644 --- a/src/components/legend/defaults.js +++ b/src/components/legend/defaults.js @@ -99,7 +99,7 @@ module.exports = function legendDefaults(layoutIn, layoutOut, fullData) { } else { // maybe use y=1.1 / yanchor=bottom as above // to avoid https://github.com/plotly/plotly.js/issues/1199 - // in v2 + // in v3 defaultY = -0.1; defaultYAnchor = 'top'; } diff --git a/src/components/shapes/defaults.js b/src/components/shapes/defaults.js index 978308fb21b..b899ecc3d45 100644 --- a/src/components/shapes/defaults.js +++ b/src/components/shapes/defaults.js @@ -81,7 +81,7 @@ function handleShapeDefaults(shapeIn, shapeOut, fullLayout) { var dflt0 = 0.25; var dflt1 = 0.75; - // hack until V2.0 when log has regular range behavior - make it look like other + // hack until V3.0 when log has regular range behavior - make it look like other // ranges to send to coerce, then put it back after // this is all to give reasonable default position behavior on log axes, which is // a pretty unimportant edge case so we could just ignore this. diff --git a/src/components/shapes/helpers.js b/src/components/shapes/helpers.js index 4dc77d34f32..dfb91030981 100644 --- a/src/components/shapes/helpers.js +++ b/src/components/shapes/helpers.js @@ -18,7 +18,7 @@ var Lib = require('../../lib'); // so these have to be specified in terms of the category serial numbers, // but can take fractional values. Other axis types we specify position based on // the actual data values. -// TODO: in V2.0 (when log axis ranges are in data units) range and shape position +// TODO: in V3.0 (when log axis ranges are in data units) range and shape position // will be identical, so rangeToShapePosition and shapePositionToRange can be // removed entirely. diff --git a/src/plot_api/plot_config.js b/src/plot_api/plot_config.js index ff45ad6cb0d..656e0e10018 100644 --- a/src/plot_api/plot_config.js +++ b/src/plot_api/plot_config.js @@ -126,7 +126,7 @@ var configAttributes = { dflt: false, description: [ 'Determines whether to change the layout size when window is resized.', - 'In v2, this option will be removed and will always be true.' + 'In v3, this option will be removed and will always be true.' ].join(' ') }, fillFrame: { diff --git a/src/plots/cartesian/helpers.js b/src/plots/cartesian/helpers.js index fad4bef3955..40ee8e2b298 100644 --- a/src/plots/cartesian/helpers.js +++ b/src/plots/cartesian/helpers.js @@ -11,7 +11,7 @@ var strTranslate = require('../../lib').strTranslate; -// in v2 (once log ranges are fixed), +// in v3 (once log ranges are fixed), // we'll be able to p2r here for all axis types function p2r(ax, v) { switch(ax.type) { diff --git a/src/plots/cartesian/select.js b/src/plots/cartesian/select.js index e85df52e9e8..2c6abc16e95 100644 --- a/src/plots/cartesian/select.js +++ b/src/plots/cartesian/select.js @@ -355,9 +355,9 @@ function prepSelect(e, startX, startY, dragOptions, mode) { } if(clickmode === 'event') { - // TODO: remove in v2 - this was probably never intended to work as it does, + // TODO: remove in v3 - this was probably never intended to work as it does, // but in case anyone depends on it we don't want to break it now. - // Note that click-to-select introduced pre v2 also emitts proper + // Note that click-to-select introduced pre v3 also emitts proper // event data when clickmode is having 'select' in its flag list. gd.emit('plotly_selected', undefined); } diff --git a/src/plots/cartesian/set_convert.js b/src/plots/cartesian/set_convert.js index 01cbb7b115c..5ae4eb51acf 100644 --- a/src/plots/cartesian/set_convert.js +++ b/src/plots/cartesian/set_convert.js @@ -58,7 +58,7 @@ function isValidCategory(v) { * - category: calcdata format (c), and will stay that way because * the data format has no continuous mapping * - log: linearized (l) format - * TODO: in v2.0 we plan to change it to data format. At that point + * TODO: in v3.0 we plan to change it to data format. At that point * shapes will work the same way as ranges, tick0, and annotations * so they can use this conversion too. * @@ -95,7 +95,7 @@ module.exports = function setConvert(ax, fullLayout) { if((opts || {}).msUTC && isNumeric(v)) { // For now it is only used // to fix bar length in milliseconds & gl3d ticks - // It could be applied in other places in v2 + // It could be applied in other places in v3 return +v; } diff --git a/src/plots/plots.js b/src/plots/plots.js index 6fdf074e5e4..76932063f0f 100644 --- a/src/plots/plots.js +++ b/src/plots/plots.js @@ -695,7 +695,7 @@ function getFormatObj(gd, formatKeys) { /** * getFormatter: combine the final separators with the locale formatting object * we pulled earlier to generate number and time formatters - * TODO: remove separators in v2, only use locale, so we don't need this step? + * TODO: remove separators in v3, only use locale, so we don't need this step? * * @param {object} formatObj: d3.locale format object * @param {string} separators: length-2 string to override decimal and thousands @@ -1496,7 +1496,7 @@ plots.supplyLayoutGlobalDefaults = function(layoutIn, layoutOut, formatObj) { // layouts with no set width and height were set temporary set to 'initial' // to pass through the autosize routine // - // This behavior is subject to change in v2. + // This behavior is subject to change in v3. coerce('autosize', !(layoutIn.width && layoutIn.height)); coerce('width'); diff --git a/src/traces/splom/attributes.js b/src/traces/splom/attributes.js index 4a500196564..34e817cbf41 100644 --- a/src/traces/splom/attributes.js +++ b/src/traces/splom/attributes.js @@ -101,7 +101,7 @@ module.exports = { ].join(' ') }, - // TODO make 'true' the default in v2? + // TODO make 'true' the default in v3? matches: { valType: 'boolean', dflt: false, diff --git a/test/jasmine/tests/axes_test.js b/test/jasmine/tests/axes_test.js index 88113fa191b..fe281ca42b2 100644 --- a/test/jasmine/tests/axes_test.js +++ b/test/jasmine/tests/axes_test.js @@ -3857,7 +3857,7 @@ describe('Test axes', function() { var dates = [[2000, 0, 1], [2001, 0, 1], [2002, 0, 1]] .map(function(d) { return new Date(d[0], d[1], d[2]).getTime(); }); - // We could make this work down the road (in v2), + // We could make this work down the road (in v3), // when address our timezone problems. var out = _makeCalcdata({ x: new Float64Array(dates) diff --git a/test/jasmine/tests/histogram_test.js b/test/jasmine/tests/histogram_test.js index 7d15632f199..e7bb3c8fb1c 100644 --- a/test/jasmine/tests/histogram_test.js +++ b/test/jasmine/tests/histogram_test.js @@ -1110,7 +1110,7 @@ describe('Test histogram', function() { it('should update autobins correctly when restyling', function(done) { // note: I'm *not* testing what this does to gd.data, as that's - // really a matter of convenience and will perhaps change later (v2?) + // really a matter of convenience and will perhaps change later (v3?) var data1 = [1.5, 2, 2, 3, 3, 3, 4, 4, 5]; Plotly.newPlot(gd, [{x: data1, type: 'histogram' }]) .then(function() { diff --git a/test/jasmine/tests/plot_api_test.js b/test/jasmine/tests/plot_api_test.js index 35dfb1b7b45..eee1e249143 100644 --- a/test/jasmine/tests/plot_api_test.js +++ b/test/jasmine/tests/plot_api_test.js @@ -121,7 +121,7 @@ describe('Test plot api', function() { // some of these tests use the undo/redo queue // OK, this is weird... the undo/redo queue length is a global config only. // It's ignored on the plot, even though the queue itself is per-plot. - // We may ditch this later, but probably not until v2 + // We may ditch this later, but probably not until v3 Plotly.setPlotConfig({queueLength: 3}); }); @@ -447,7 +447,7 @@ describe('Test plot api', function() { .then(function() { // Ideally we should change this to xaxis.autorange: 'reversed' // but that's a weird disappearing setting used just to force - // an initial reversed autorange. Proposed v2 change at: + // an initial reversed autorange. Proposed v3 change at: // https://github.com/plotly/plotly.js/issues/420#issuecomment-323435082 return Plotly.relayout(gd, 'xaxis.reverse', true); }) @@ -1100,7 +1100,7 @@ describe('Test plot api', function() { // some of these tests use the undo/redo queue // OK, this is weird... the undo/redo queue length is a global config only. // It's ignored on the plot, even though the queue itself is per-plot. - // We may ditch this later, but probably not until v2 + // We may ditch this later, but probably not until v3 Plotly.setPlotConfig({queueLength: 3}); }); diff --git a/test/jasmine/tests/select_test.js b/test/jasmine/tests/select_test.js index 889cd178cff..0e8eb31b29c 100644 --- a/test/jasmine/tests/select_test.js +++ b/test/jasmine/tests/select_test.js @@ -115,7 +115,7 @@ function assertEventCounts(selecting, selected, deselect, msg) { expect(deselectCnt).toBe(deselect, 'plotly_deselect call count: ' + msg); } -// TODO: in v2, when we get rid of the `plotly_selected->undefined` event, these will +// TODO: in v3, when we get rid of the `plotly_selected->undefined` event, these will // change to BOXEVENTS = [1, 1, 1], LASSOEVENTS = [4, 1, 1]. See also _run down below // // events for box or lasso select mouse moves then a doubleclick @@ -1837,7 +1837,7 @@ describe('Test select box and lasso per trace:', function() { return (eventCounts[0] ? selectedPromise : Promise.resolve()) .then(afterDragFn) .then(function() { - // TODO: in v2 when we remove the `plotly_selecting->undefined` the Math.max(...) + // TODO: in v3 when we remove the `plotly_selecting->undefined` the Math.max(...) // in the middle here will turn into just eventCounts[1]. // It's just here because one of the selected events is generated during // doubleclick so hasn't happened yet when we're testing this. diff --git a/test/jasmine/tests/shapes_test.js b/test/jasmine/tests/shapes_test.js index 1bbab85dffd..d1a262bd017 100644 --- a/test/jasmine/tests/shapes_test.js +++ b/test/jasmine/tests/shapes_test.js @@ -114,7 +114,7 @@ describe('Test shapes defaults:', function() { expect(shape1Out.x0).toBe(5); expect(shape1Out.x1).toBe(15); - // shapes use data values for log axes (like everyone will in V2.0) + // shapes use data values for log axes (like everyone will in V3.0) expect(shape1Out.y0).toBeWithin(100, 0.001); expect(shape1Out.y1).toBeWithin(10000, 0.001);