Skip to content

Commit fd5bf11

Browse files
committed
🔪 obsolete files and logic
1 parent a30beea commit fd5bf11

File tree

5 files changed

+8
-291
lines changed

5 files changed

+8
-291
lines changed

src/lib/array_to_calc_item.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/lib/geojson_utils.js

Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,70 +54,50 @@ exports.calcTraceToLineCoords = function(calcTrace) {
5454
*
5555
* @param {array} coords
5656
* results form calcTraceToLineCoords
57-
* @param {object} trace
58-
* (optional) full trace object to be added on to output
59-
*
6057
* @return {object} out
6158
* GeoJSON object
6259
*
6360
*/
64-
exports.makeLine = function(coords, trace) {
65-
var out = {};
66-
61+
exports.makeLine = function(coords) {
6762
if(coords.length === 1) {
68-
out = {
63+
return {
6964
type: 'LineString',
7065
coordinates: coords[0]
7166
};
72-
}
73-
else {
74-
out = {
67+
} else {
68+
return {
7569
type: 'MultiLineString',
7670
coordinates: coords
7771
};
7872
}
79-
80-
if(trace) out.trace = trace;
81-
82-
return out;
8373
};
8474

8575
/**
8676
* Make polygon ('Polygon' or 'MultiPolygon') GeoJSON
8777
*
8878
* @param {array} coords
8979
* results form calcTraceToLineCoords
90-
* @param {object} trace
91-
* (optional) full trace object to be added on to output
92-
*
9380
* @return {object} out
9481
* GeoJSON object
9582
*/
96-
exports.makePolygon = function(coords, trace) {
97-
var out = {};
98-
83+
exports.makePolygon = function(coords) {
9984
if(coords.length === 1) {
100-
out = {
85+
return {
10186
type: 'Polygon',
10287
coordinates: coords
10388
};
104-
}
105-
else {
89+
} else {
10690
var _coords = new Array(coords.length);
10791

10892
for(var i = 0; i < coords.length; i++) {
10993
_coords[i] = [coords[i]];
11094
}
11195

112-
out = {
96+
return {
11397
type: 'MultiPolygon',
11498
coordinates: _coords
11599
};
116100
}
117-
118-
if(trace) out.trace = trace;
119-
120-
return out;
121101
};
122102

123103
/**

src/plots/geo/layout/axis_defaults.js

Lines changed: 0 additions & 72 deletions
This file was deleted.

src/plots/geo/set_scale.js

Lines changed: 0 additions & 149 deletions
This file was deleted.

src/plots/geo/zoom_reset.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)