Skip to content

Commit 4b8f980

Browse files
committed
move geo missing id warn -> log
1 parent 4b48038 commit 4b8f980

File tree

4 files changed

+8
-11
lines changed

4 files changed

+8
-11
lines changed

src/lib/geo_location_utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ exports.locationToFeature = function(locationmode, location, features) {
3434
if(feature.id === locationId) return feature;
3535
}
3636

37-
Lib.warn([
37+
Lib.log([
3838
'Location with id', locationId,
3939
'does not have a matching topojson feature at this resolution.'
4040
].join(' '));
@@ -56,7 +56,7 @@ function countryNameToISO3(countryName) {
5656
if(regex.test(countryName.trim().toLowerCase())) return iso3;
5757
}
5858

59-
Lib.warn('Unrecognized country name: ' + countryName + '.');
59+
Lib.log('Unrecognized country name: ' + countryName + '.');
6060

6161
return false;
6262
}

test/image/index.html

-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
<!-- this index file gets copied in to the image server docker -->
55
<script type="text/javascript" src="../plotly.js/dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
66
<script type="text/javascript" src="../plotly.js/build/plotly.js" charset="utf-8"></script>
7-
<script type="text/javascript">
8-
Plotly.setPlotConfig({logging: 0});
9-
</script>
107
<script type="text/javascript" src="../plotly.js/dist/plotly-geo-assets.js" charset="utf-8"></script>
118
<script type="text/javascript" src="./main.js"></script>
129
</body>

test/jasmine/tests/choropleth_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,16 @@ describe('choropleth bad data', function() {
172172
afterEach(destroyGraphDiv);
173173

174174
it('should not throw an error with bad locations', function(done) {
175-
spyOn(Lib, 'warn');
175+
spyOn(Lib, 'log');
176176
Plotly.newPlot(gd, [{
177177
locations: ['canada', 0, null, '', 'utopia'],
178178
z: [1, 2, 3, 4, 5],
179179
locationmode: 'country names',
180180
type: 'choropleth'
181181
}])
182182
.then(function() {
183-
// only utopia warns - others are silently ignored
184-
expect(Lib.warn).toHaveBeenCalledTimes(1);
183+
// only utopia logs - others are silently ignored
184+
expect(Lib.log).toHaveBeenCalledTimes(1);
185185
})
186186
.catch(fail)
187187
.then(done);

test/jasmine/tests/scattergeo_test.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,15 @@ describe('scattergeo bad data', function() {
348348
afterEach(destroyGraphDiv);
349349

350350
it('should not throw an error with bad locations', function(done) {
351-
spyOn(Lib, 'warn');
351+
spyOn(Lib, 'log');
352352
Plotly.newPlot(gd, [{
353353
locations: ['canada', 0, null, '', 'utopia'],
354354
locationmode: 'country names',
355355
type: 'scattergeo'
356356
}])
357357
.then(function() {
358-
// only utopia warns - others are silently ignored
359-
expect(Lib.warn).toHaveBeenCalledTimes(1);
358+
// only utopia logs - others are silently ignored
359+
expect(Lib.log).toHaveBeenCalledTimes(1);
360360
})
361361
.catch(fail)
362362
.then(done);

0 commit comments

Comments
 (0)