Skip to content

Commit a1ea0bc

Browse files
committed
find & replace mapnew > map
1 parent 5f0e9e7 commit a1ea0bc

File tree

88 files changed

+874
-874
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+874
-874
lines changed

.circleci/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ case $1 in
9696
SUITE=$({\
9797
find $ROOT/test/image/mocks/gl* -type f -printf "%f\n"; \
9898
find $ROOT/test/image/mocks/mapbox* -type f -printf "%f\n"; \
99-
find $ROOT/test/image/mocks/mapnew* -type f -printf "%f\n"; \
99+
find $ROOT/test/image/mocks/map* -type f -printf "%f\n"; \
100100
} | sed 's/\.json$//1' | circleci tests split)
101101
python3 test/image/make_baseline.py virtual-webgl $SUITE || EXIT_STATE=$?
102102
exit $EXIT_STATE

lib/choroplethmapnew.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict';
22

3-
module.exports = require('../src/traces/choroplethmapnew');
3+
module.exports = require('../src/traces/choroplethmap');

lib/densitymapnew.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict';
22

3-
module.exports = require('../src/traces/densitymapnew');
3+
module.exports = require('../src/traces/densitymap');

lib/index-mapnew.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ var Plotly = require('./core');
44

55
Plotly.register([
66
// traces
7-
require('./scattermapnew'),
8-
require('./choroplethmapnew'),
9-
require('./densitymapnew'),
7+
require('./scattermap'),
8+
require('./choroplethmap'),
9+
require('./densitymap'),
1010

1111
// transforms
1212
require('./aggregate'),

lib/index-strict.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Plotly.register([
3939
require('./scattermapbox'),
4040
require('./choroplethmapbox'),
4141
require('./densitymapbox'),
42-
require('./scattermapnew'),
43-
require('./choroplethmapnew'),
44-
require('./densitymapnew'),
42+
require('./scattermap'),
43+
require('./choroplethmap'),
44+
require('./densitymap'),
4545
require('./sankey'),
4646
require('./indicator'),
4747
require('./table'),

lib/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Plotly.register([
3939
require('./scattermapbox'),
4040
require('./choroplethmapbox'),
4141
require('./densitymapbox'),
42-
require('./scattermapnew'),
43-
require('./choroplethmapnew'),
44-
require('./densitymapnew'),
42+
require('./scattermap'),
43+
require('./choroplethmap'),
44+
require('./densitymap'),
4545
require('./sankey'),
4646
require('./indicator'),
4747
require('./table'),

lib/scattermapnew.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
'use strict';
22

3-
module.exports = require('../src/traces/scattermapnew');
3+
module.exports = require('../src/traces/scattermap');

src/components/fx/hover.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1564,7 +1564,7 @@ function getHoverLabelText(d, showCommonLabel, hovermode, fullLayout, t0, g) {
15641564
if(
15651565
d.trace.type !== 'choropleth' &&
15661566
d.trace.type !== 'choroplethmapbox' &&
1567-
d.trace.type !== 'choroplethmapnew'
1567+
d.trace.type !== 'choroplethmap'
15681568
) {
15691569
text += (text ? 'z: ' : '') + d.zLabel;
15701570
}

src/components/fx/layout_defaults.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ module.exports = function supplyLayoutDefaults(layoutIn, layoutOut) {
1919
var dragMode = coerce('dragmode');
2020
if(dragMode === 'select') coerce('selectdirection');
2121

22-
// if only mapbox, mapnew or geo subplots is present on graph,
22+
// if only mapbox, map or geo subplots is present on graph,
2323
// reset 'zoom' dragmode to 'pan' until 'zoom' is implemented,
2424
// so that the correct modebar button is active
25-
var hasMap = layoutOut._has('mapbox') || layoutOut._has('mapnew');
25+
var hasMap = layoutOut._has('mapbox') || layoutOut._has('map');
2626
var hasGeo = layoutOut._has('geo');
2727
var len = layoutOut._basePlotModules.length;
2828

src/components/legend/style.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,14 +542,14 @@ module.exports = function style(s, gd, legend) {
542542
break;
543543
case 'choropleth' :
544544
case 'choroplethmapbox' :
545-
case 'choroplethmapnew' :
545+
case 'choroplethmap' :
546546
ptsData = [
547547
['M-6,-6V6H6V-6Z']
548548
];
549549
useGradient = true;
550550
break;
551551
case 'densitymapbox' :
552-
case 'densitymapnew' :
552+
case 'densitymap' :
553553
ptsData = [
554554
['M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0']
555555
];

src/components/modebar/buttons.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ modeBarButtons.resetViews = {
652652

653653
resetView(gd, 'geo');
654654
resetView(gd, 'mapbox');
655-
resetView(gd, 'mapnew');
655+
resetView(gd, 'map');
656656
}
657657
};
658658

@@ -696,14 +696,14 @@ modeBarButtons.resetViewMapbox = {
696696
}
697697
};
698698

699-
modeBarButtons.resetViewMapnew = {
700-
name: 'resetViewMapnew',
699+
modeBarButtons.resetViewMap = {
700+
name: 'resetViewMap',
701701
_cat: 'resetView',
702702
title: function(gd) { return _(gd, 'Reset view'); },
703703
attr: 'reset',
704704
icon: Icons.home,
705705
click: function(gd) {
706-
resetView(gd, 'mapnew');
706+
resetView(gd, 'map');
707707
}
708708
};
709709

@@ -717,14 +717,14 @@ modeBarButtons.zoomInMapbox = {
717717
click: handleMapboxZoom
718718
};
719719

720-
modeBarButtons.zoomInMapnew = {
721-
name: 'zoomInMapnew',
720+
modeBarButtons.zoomInMap = {
721+
name: 'zoomInMap',
722722
_cat: 'zoomin',
723723
title: function(gd) { return _(gd, 'Zoom in'); },
724724
attr: 'zoom',
725725
val: 'in',
726726
icon: Icons.zoom_plus,
727-
click: handleMapnewZoom
727+
click: handleMapZoom
728728
};
729729

730730
modeBarButtons.zoomOutMapbox = {
@@ -737,22 +737,22 @@ modeBarButtons.zoomOutMapbox = {
737737
click: handleMapboxZoom
738738
};
739739

740-
modeBarButtons.zoomOutMapnew = {
741-
name: 'zoomOutMapnew',
740+
modeBarButtons.zoomOutMap = {
741+
name: 'zoomOutMap',
742742
_cat: 'zoomout',
743743
title: function(gd) { return _(gd, 'Zoom out'); },
744744
attr: 'zoom',
745745
val: 'out',
746746
icon: Icons.zoom_minus,
747-
click: handleMapnewZoom
747+
click: handleMapZoom
748748
};
749749

750750
function handleMapboxZoom(gd, ev) {
751751
_handleMapZoom(gd, ev, 'mapbox');
752752
}
753753

754-
function handleMapnewZoom(gd, ev) {
755-
_handleMapZoom(gd, ev, 'mapnew');
754+
function handleMapZoom(gd, ev) {
755+
_handleMapZoom(gd, ev, 'map');
756756
}
757757

758758
function _handleMapZoom(gd, ev, mapType) {

src/components/modebar/manage.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function getButtonGroups(gd) {
110110
var hasGL2D = fullLayout._has('gl2d');
111111
var hasTernary = fullLayout._has('ternary');
112112
var hasMapbox = fullLayout._has('mapbox');
113-
var hasMapnew = fullLayout._has('mapnew');
113+
var hasMap = fullLayout._has('map');
114114
var hasPolar = fullLayout._has('polar');
115115
var hasSmith = fullLayout._has('smith');
116116
var hasSankey = fullLayout._has('sankey');
@@ -155,7 +155,7 @@ function getButtonGroups(gd) {
155155
var resetGroup = [];
156156
var dragModeGroup = [];
157157

158-
if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMapnew + hasPolar + hasSmith > 1) {
158+
if((hasCartesian || hasGL2D || hasPie || hasFunnelarea || hasTernary) + hasGeo + hasGL3D + hasMapbox + hasMap + hasPolar + hasSmith > 1) {
159159
// graphs with more than one plot types get 'union buttons'
160160
// which reset the view or toggle hover labels across all subplots.
161161
hoverGroup = ['toggleHover'];
@@ -171,10 +171,10 @@ function getButtonGroups(gd) {
171171
zoomGroup = ['zoomInMapbox', 'zoomOutMapbox'];
172172
hoverGroup = ['toggleHover'];
173173
resetGroup = ['resetViewMapbox'];
174-
} else if(hasMapnew) {
175-
zoomGroup = ['zoomInMapnew', 'zoomOutMapnew'];
174+
} else if(hasMap) {
175+
zoomGroup = ['zoomInMap', 'zoomOutMap'];
176176
hoverGroup = ['toggleHover'];
177-
resetGroup = ['resetViewMapnew'];
177+
resetGroup = ['resetViewMap'];
178178
} else if(hasGL2D) {
179179
hoverGroup = ['hoverClosestGl2d'];
180180
} else if(hasPie) {
@@ -205,7 +205,7 @@ function getButtonGroups(gd) {
205205
dragModeGroup = ['zoom3d', 'pan3d', 'orbitRotation', 'tableRotation'];
206206
} else if(((hasCartesian || hasGL2D) && !allAxesFixed) || hasTernary) {
207207
dragModeGroup = ['zoom2d', 'pan2d'];
208-
} else if(hasMapbox || hasMapnew || hasGeo) {
208+
} else if(hasMapbox || hasMap || hasGeo) {
209209
dragModeGroup = ['pan2d'];
210210
} else if(hasPolar) {
211211
dragModeGroup = ['zoom2d'];
@@ -233,7 +233,7 @@ function getButtonGroups(gd) {
233233
if(DRAW_MODES.indexOf(b) !== -1) {
234234
// accept pre-defined drag modes i.e. shape drawing features as string
235235
if(
236-
fullLayout._has('mapbox') || fullLayout._has('mapnew') || // draw shapes in paper coordinate (could be improved in future to support data coordinate, when there is no pitch)
236+
fullLayout._has('mapbox') || fullLayout._has('map') || // draw shapes in paper coordinate (could be improved in future to support data coordinate, when there is no pitch)
237237
fullLayout._has('cartesian') // draw shapes in data coordinate
238238
) {
239239
dragModeGroup.push(b);

src/components/selections/select.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ function getFillRangeItems(dragOptions) {
15491549
var plotinfo = dragOptions.plotinfo;
15501550

15511551
return (
1552-
plotinfo.fillRangeItems || // allow subplots (i.e. geo, mapbox, mapnew, sankey) to override fillRangeItems routine
1552+
plotinfo.fillRangeItems || // allow subplots (i.e. geo, mapbox, map, sankey) to override fillRangeItems routine
15531553
makeFillRangeItems(dragOptions.xaxes.concat(dragOptions.yaxes))
15541554
);
15551555
}

src/plot_api/plot_api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ function setPlotContext(gd, config) {
518518
szOut.gl3d = 1;
519519
szOut.geo = 1;
520520
szOut.mapbox = 1;
521-
szOut.mapnew = 1;
521+
szOut.map = 1;
522522
} else if(typeof szIn === 'string') {
523523
var parts = szIn.split('+');
524524
for(i = 0; i < parts.length; i++) {
@@ -528,7 +528,7 @@ function setPlotContext(gd, config) {
528528
szOut.gl3d = 1;
529529
szOut.geo = 1;
530530
szOut.mapbox = 1;
531-
szOut.mapnew = 1;
531+
szOut.map = 1;
532532
}
533533
}
534534

@@ -2390,7 +2390,7 @@ var layoutUIControlPatterns = [
23902390
{pattern: /^(polar\d*\.radialaxis)\.((auto)?range|angle|title\.text)/},
23912391
{pattern: /^(polar\d*\.angularaxis)\.rotation/},
23922392
{pattern: /^(mapbox\d*)\.(center|zoom|bearing|pitch)/},
2393-
{pattern: /^(mapnew\d*)\.(center|zoom|bearing|pitch)/},
2393+
{pattern: /^(map\d*)\.(center|zoom|bearing|pitch)/},
23942394

23952395
{pattern: /^legend\.(x|y)$/, attr: 'editrevision'},
23962396
{pattern: /^(shapes|annotations)/, attr: 'editrevision'},

src/plot_api/plot_config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,12 +157,12 @@ var configAttributes = {
157157

158158
scrollZoom: {
159159
valType: 'flaglist',
160-
flags: ['cartesian', 'gl3d', 'geo', 'mapbox', 'mapnew'],
160+
flags: ['cartesian', 'gl3d', 'geo', 'mapbox', 'map'],
161161
extras: [true, false],
162-
dflt: 'gl3d+geo+mapnew',
162+
dflt: 'gl3d+geo+map',
163163
description: [
164164
'Determines whether mouse wheel or two-finger scroll zooms is enable.',
165-
'Turned on by default for gl3d, geo, mapbox and mapnew subplots',
165+
'Turned on by default for gl3d, geo, mapbox and map subplots',
166166
'(as these subplot types do not have zoombox via pan),',
167167
'but turned off by default for cartesian subplots.',
168168
'Set `scrollZoom` to *false* to disable scrolling for all subplots.'
@@ -192,7 +192,7 @@ var configAttributes = {
192192
'This is the time interval (in ms) between first mousedown and',
193193
'2nd mouseup to constitute a double-click.',
194194
'This setting propagates to all on-subplot double clicks',
195-
'(except for geo, mapbox and mapnew) and on-legend double clicks.'
195+
'(except for geo, mapbox and map) and on-legend double clicks.'
196196
].join(' ')
197197
},
198198

src/plots/mapnew/constants.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ var arcgisSat = {
126126

127127
};
128128

129-
var stylesMapnew = {
129+
var stylesMap = {
130130
basic: cartoVoyager,
131131
streets: cartoVoyager,
132132
outdoors: cartoVoyager,
@@ -237,28 +237,28 @@ var stylesMapnew = {
237237
}
238238
};
239239

240-
var styleValuesMapnew = sortObjectKeys(stylesMapnew);
240+
var styleValuesMap = sortObjectKeys(stylesMap);
241241

242242
module.exports = {
243243
requiredVersion: requiredVersion,
244244

245245

246246
styleValueDflt: 'basic',
247-
stylesMapnew: stylesMapnew,
248-
styleValuesMapnew: styleValuesMapnew,
247+
stylesMap: stylesMap,
248+
styleValuesMap: styleValuesMap,
249249

250250
traceLayerPrefix: 'plotly-trace-layer-',
251251
layoutLayerPrefix: 'plotly-layout-layer-',
252252

253253

254254
missingStyleErrorMsg: [
255-
'No valid maplibre style found, please set `mapnew.style` to one of:',
256-
styleValuesMapnew.join(', '),
255+
'No valid maplibre style found, please set `map.style` to one of:',
256+
styleValuesMap.join(', '),
257257
'or use a tile service.'
258258
].join('\n'),
259259

260260

261-
mapOnErrorMsg: 'Mapnew error.',
261+
mapOnErrorMsg: 'Map error.',
262262

263263

264264
};

src/plots/mapnew/convert_text_opts.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
var Lib = require('../../lib');
44

55
/**
6-
* Convert plotly.js 'textposition' to mapnew-gl 'anchor' and 'offset'
6+
* Convert plotly.js 'textposition' to map-gl 'anchor' and 'offset'
77
* (with the help of the icon size).
88
*
99
* @param {string} textpostion : plotly.js textposition value
@@ -48,7 +48,7 @@ module.exports = function convertTextOpts(textposition, iconSize) {
4848
break;
4949
}
5050

51-
// Mapnew text-anchor must be one of:
51+
// Map text-anchor must be one of:
5252
// center, left, right, top, bottom,
5353
// top-left, top-right, bottom-left, bottom-right
5454

0 commit comments

Comments
 (0)