More cleanups to iD-sprite and styles, remove old png and json files
@@ -13,8 +13,6 @@ MAKI_TARGETS = \
|
||||
data/feature-icons.json
|
||||
|
||||
MAKI_SOURCES = \
|
||||
data/line-icons.json \
|
||||
data/relation-icons.json \
|
||||
node_modules/maki/www/maki-sprite.json \
|
||||
dist/img/maki-sprite.png
|
||||
|
||||
|
||||
@@ -296,7 +296,6 @@ fs.writeFileSync('data/data.js', 'iD.data = ' + stringify({
|
||||
wikipedia: r('wikipedia.json'),
|
||||
imperial: r('imperial.json'),
|
||||
featureIcons: r('feature-icons.json'),
|
||||
operations: r('operations-sprite.json'),
|
||||
locales: r('locales.json'),
|
||||
en: read('dist/locales/en.json'),
|
||||
suggestions: r('name-suggestions.json'),
|
||||
|
||||
@@ -2910,12 +2910,12 @@ div.full-screen > button:hover {
|
||||
}
|
||||
|
||||
.radial-menu-item circle {
|
||||
fill: white;
|
||||
fill: #eee;
|
||||
}
|
||||
|
||||
.radial-menu-item circle:active,
|
||||
.radial-menu-item circle:hover {
|
||||
fill: #eaeaea;
|
||||
fill: #fff;
|
||||
}
|
||||
|
||||
.radial-menu-item.disabled circle {
|
||||
@@ -2923,12 +2923,14 @@ div.full-screen > button:hover {
|
||||
fill: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
.radial-menu-item.enabled use {
|
||||
.radial-menu-item use {
|
||||
fill: #222;
|
||||
color: #79f;
|
||||
}
|
||||
|
||||
.radial-menu-item.disabled use {
|
||||
fill: rgba(32,32,32,.5);
|
||||
color: rgba(40,40,40,.5);
|
||||
}
|
||||
|
||||
.lasso-box {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
/* This file is generated by make. Do NOT edit manually. */
|
||||
|
||||
.preset-icon{background-image:url(img/maki-sprite.png);background-repeat:no-repeat;width:24px;height:24px;}
|
||||
.preset-icon-line{background-image:url(img/line-presets.png);background-repeat:no-repeat;width:60px;height:60px;}
|
||||
.preset-icon-relation{background-image:url(img/relation-presets.png);background-repeat:no-repeat;width:60px;height:60px;}
|
||||
.feature-circle-stroked{background-position:-0px -0px;}
|
||||
.feature-circle{background-position:-54px -0px;}
|
||||
.feature-square-stroked{background-position:-108px -0px;}
|
||||
@@ -119,65 +117,3 @@
|
||||
.feature-scooter{background-position:-162px -528px;}
|
||||
.feature-gift{background-position:-216px -528px;}
|
||||
.feature-ice-cream{background-position:-0px -552px;}
|
||||
.preset-icon-line.feature-highway-motorway{background-position:-20px -25px;}
|
||||
.preset-icon-line.feature-highway-trunk{background-position:-80px -25px;}
|
||||
.preset-icon-line.feature-highway-primary{background-position:-140px -25px;}
|
||||
.preset-icon-line.feature-highway-secondary{background-position:-200px -25px;}
|
||||
.preset-icon-line.feature-highway-tertiary{background-position:-260px -25px;}
|
||||
.preset-icon-line.feature-highway-motorway-link{background-position:-320px -25px;}
|
||||
.preset-icon-line.feature-highway-trunk-link{background-position:-380px -25px;}
|
||||
.preset-icon-line.feature-highway-primary-link{background-position:-440px -25px;}
|
||||
.preset-icon-line.feature-highway-secondary-link{background-position:-500px -25px;}
|
||||
.preset-icon-line.feature-highway-tertiary-link{background-position:-560px -25px;}
|
||||
.preset-icon-line.feature-highway-residential{background-position:-620px -25px;}
|
||||
.preset-icon-line.feature-highway-unclassified{background-position:-680px -25px;}
|
||||
.preset-icon-line.feature-highway-service{background-position:-740px -25px;}
|
||||
.preset-icon-line.feature-highway-road{background-position:-800px -25px;}
|
||||
.preset-icon-line.feature-highway-track{background-position:-860px -25px;}
|
||||
.preset-icon-line.feature-highway-living-street{background-position:-920px -25px;}
|
||||
.preset-icon-line.feature-highway-path{background-position:-980px -25px;}
|
||||
.preset-icon-line.feature-highway-cycleway{background-position:-1040px -25px;}
|
||||
.preset-icon-line.feature-highway-footway{background-position:-1100px -25px;}
|
||||
.preset-icon-line.feature-highway-bridleway{background-position:-1160px -25px;}
|
||||
.preset-icon-line.feature-highway-steps{background-position:-1220px -25px;}
|
||||
.preset-icon-line.feature-railway-rail{background-position:-1280px -25px;}
|
||||
.preset-icon-line.feature-railway-disused{background-position:-1340px -25px;}
|
||||
.preset-icon-line.feature-railway-abandoned{background-position:-1400px -25px;}
|
||||
.preset-icon-line.feature-railway-subway{background-position:-1460px -25px;}
|
||||
.preset-icon-line.feature-railway-light-rail{background-position:-1520px -25px;}
|
||||
.preset-icon-line.feature-railway-monorail{background-position:-1580px -25px;}
|
||||
.preset-icon-line.feature-waterway-river{background-position:-1640px -25px;}
|
||||
.preset-icon-line.feature-waterway-stream{background-position:-1700px -25px;}
|
||||
.preset-icon-line.feature-waterway-canal{background-position:-1760px -25px;}
|
||||
.preset-icon-line.feature-waterway-ditch{background-position:-1820px -25px;}
|
||||
.preset-icon-line.feature-power-line{background-position:-1880px -25px;}
|
||||
.preset-icon-line.feature-other-line{background-position:-1940px -25px;}
|
||||
.preset-icon-line.feature-category-roads{background-position:-2000px -25px;}
|
||||
.preset-icon-line.feature-category-rail{background-position:-2060px -25px;}
|
||||
.preset-icon-line.feature-category-path{background-position:-2120px -25px;}
|
||||
.preset-icon-line.feature-category-water{background-position:-2180px -25px;}
|
||||
.preset-icon-line.feature-ferry{background-position:-2240px -25px;}
|
||||
.preset-icon-line.feature-pipeline{background-position:-2300px -25px;}
|
||||
.preset-icon-relation.feature-relation{background-position:-20px -25px;}
|
||||
.preset-icon-relation.feature-restriction{background-position:-80px -25px;}
|
||||
.preset-icon-relation.feature-multipolygon{background-position:-141px -25px;}
|
||||
.preset-icon-relation.feature-boundary{background-position:-200px -25px;}
|
||||
.preset-icon-relation.feature-route{background-position:-260px -25px;}
|
||||
.preset-icon-relation.feature-route-road{background-position:-320px -25px;}
|
||||
.preset-icon-relation.feature-route-bicycle{background-position:-380px -25px;}
|
||||
.preset-icon-relation.feature-route-foot{background-position:-440px -25px;}
|
||||
.preset-icon-relation.feature-route-bus{background-position:-500px -25px;}
|
||||
.preset-icon-relation.feature-route-train{background-position:-560px -25px;}
|
||||
.preset-icon-relation.feature-route-detour{background-position:-620px -25px;}
|
||||
.preset-icon-relation.feature-route-tram{background-position:-680px -25px;}
|
||||
.preset-icon-relation.feature-route-ferry{background-position:-740px -25px;}
|
||||
.preset-icon-relation.feature-route-power{background-position:-800px -25px;}
|
||||
.preset-icon-relation.feature-route-pipeline{background-position:-860px -25px;}
|
||||
.preset-icon-relation.feature-route-master{background-position:-920px -25px;}
|
||||
.preset-icon-relation.feature-restriction-no-straight-on{background-position:-980px -25px;}
|
||||
.preset-icon-relation.feature-restriction-no-u-turn{background-position:-1040px -25px;}
|
||||
.preset-icon-relation.feature-restriction-no-left-turn{background-position:-1100px -25px;}
|
||||
.preset-icon-relation.feature-restriction-no-right-turn{background-position:-1160px -25px;}
|
||||
.preset-icon-relation.feature-restriction-only-straight-on{background-position:-1220px -25px;}
|
||||
.preset-icon-relation.feature-restriction-only-left-turn{background-position:-1280px -25px;}
|
||||
.preset-icon-relation.feature-restriction-only-right-turn{background-position:-1340px -25px;}
|
||||
|
||||
@@ -21,10 +21,6 @@ img.tile-removing {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
/* allow overrideable fill for svg sprite icons */
|
||||
#defs path { fill: inherit; }
|
||||
|
||||
/*path { fill: none; }*/
|
||||
use { pointer-events: none; }
|
||||
|
||||
/* base styles */
|
||||
|
||||
@@ -15,7 +15,6 @@ iD.data = {
|
||||
path + 'data/presets/fields.json',
|
||||
path + 'data/imperial.json',
|
||||
path + 'data/feature-icons.json',
|
||||
path + 'data/operations-sprite.json',
|
||||
path + 'data/locales.json',
|
||||
path + 'dist/locales/en.json',
|
||||
path + 'data/name-suggestions.json',
|
||||
@@ -35,11 +34,10 @@ iD.data = {
|
||||
},
|
||||
imperial: data[8],
|
||||
featureIcons: data[9],
|
||||
operations: data[10],
|
||||
locales: data[11],
|
||||
en: data[12],
|
||||
suggestions: data[13],
|
||||
addressFormats: data[14]
|
||||
locales: data[10],
|
||||
en: data[11],
|
||||
suggestions: data[12],
|
||||
addressFormats: data[13]
|
||||
};
|
||||
|
||||
callback();
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
{
|
||||
"highway-motorway": [20, 25],
|
||||
"highway-trunk": [80, 25],
|
||||
"highway-primary": [140, 25],
|
||||
"highway-secondary": [200, 25],
|
||||
"highway-tertiary": [260, 25],
|
||||
"highway-motorway-link": [320, 25],
|
||||
"highway-trunk-link": [380, 25],
|
||||
"highway-primary-link": [440, 25],
|
||||
"highway-secondary-link": [500, 25],
|
||||
"highway-tertiary-link": [560, 25],
|
||||
"highway-residential": [620, 25],
|
||||
"highway-unclassified": [680, 25],
|
||||
"highway-service": [740, 25],
|
||||
"highway-road": [800, 25],
|
||||
"highway-track": [860, 25],
|
||||
"highway-living-street": [920, 25],
|
||||
"highway-path": [980, 25],
|
||||
"highway-cycleway": [1040, 25],
|
||||
"highway-footway": [1100, 25],
|
||||
"highway-bridleway": [1160, 25],
|
||||
"highway-steps": [1220, 25],
|
||||
|
||||
"railway-rail": [1280, 25],
|
||||
"railway-disused": [1340, 25],
|
||||
"railway-abandoned": [1400, 25],
|
||||
"railway-subway": [1460, 25],
|
||||
"railway-light-rail": [1520, 25],
|
||||
"railway-monorail": [1580, 25],
|
||||
|
||||
"waterway-river": [1640, 25],
|
||||
"waterway-stream": [1700, 25],
|
||||
"waterway-canal": [1760, 25],
|
||||
"waterway-ditch": [1820, 25],
|
||||
|
||||
"power-line": [1880, 25],
|
||||
|
||||
"other-line": [1940, 25],
|
||||
|
||||
"category-roads": [2000, 25],
|
||||
"category-rail": [2060, 25],
|
||||
"category-path": [2120, 25],
|
||||
"category-water": [2180, 25],
|
||||
|
||||
"ferry": [2240, 25],
|
||||
"pipeline": [2300, 25]
|
||||
}
|
||||
@@ -2,15 +2,11 @@ var fs = require('fs');
|
||||
var _ = require('../js/lib/lodash');
|
||||
|
||||
var maki = require('maki/www/maki-sprite.json');
|
||||
var lineIcons = require('./line-icons.json');
|
||||
var relationIcons = require('./relation-icons.json');
|
||||
|
||||
// Generate CSS
|
||||
var template = '.feature-{name}{background-position:-{x}px -{y}px;}\n';
|
||||
var css = "/* This file is generated by make. Do NOT edit manually. */\n\n";
|
||||
css += ".preset-icon{background-image:url(img/maki-sprite.png);background-repeat:no-repeat;width:24px;height:24px;}\n";
|
||||
css += ".preset-icon-line{background-image:url(img/line-presets.png);background-repeat:no-repeat;width:60px;height:60px;}\n";
|
||||
css += ".preset-icon-relation{background-image:url(img/relation-presets.png);background-repeat:no-repeat;width:60px;height:60px;}\n";
|
||||
|
||||
var images = {};
|
||||
|
||||
@@ -28,27 +24,5 @@ _.forEach(maki, function(dimensions, name) {
|
||||
}
|
||||
});
|
||||
|
||||
template = '.preset-icon-line.feature-{name}{background-position:-{x}px -{y}px;}\n';
|
||||
|
||||
_.forEach(lineIcons, function(position, name) {
|
||||
css += template.replace('{name}', name)
|
||||
.replace('{x}', position[0])
|
||||
.replace('{y}', position[1]);
|
||||
|
||||
images[name] = images[name] || {};
|
||||
images[name].line = position;
|
||||
});
|
||||
|
||||
template = '.preset-icon-relation.feature-{name}{background-position:-{x}px -{y}px;}\n';
|
||||
|
||||
_.forEach(relationIcons, function(position, name) {
|
||||
css += template.replace('{name}', name)
|
||||
.replace('{x}', position[0])
|
||||
.replace('{y}', position[1]);
|
||||
|
||||
images[name] = images[name] || {};
|
||||
images[name].relation = position;
|
||||
});
|
||||
|
||||
fs.writeFileSync('./css/feature-icons.css', css);
|
||||
fs.writeFileSync('./data/feature-icons.json', JSON.stringify(images));
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
"operation-delete": [0, 140],
|
||||
"operation-circularize": [20, 140],
|
||||
"operation-straighten": [40, 140],
|
||||
"operation-split": [60, 140],
|
||||
"operation-disconnect": [80, 140],
|
||||
"operation-reverse": [100, 140],
|
||||
"operation-move": [120, 140],
|
||||
"operation-merge": [140, 140],
|
||||
"operation-orthogonalize": [160, 140],
|
||||
"operation-rotate": [180, 140],
|
||||
"operation-simplify": [200, 140],
|
||||
"operation-continue": [220, 140],
|
||||
|
||||
"icon-restriction-yes": [50, 80],
|
||||
"icon-restriction-no": [95, 80],
|
||||
"icon-restriction-only": [140, 80],
|
||||
"icon-restriction-yes-u": [185, 80],
|
||||
"icon-restriction-no-u": [230, 80],
|
||||
"icon-restriction-only-u": [275, 80]
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"relation": [20, 25],
|
||||
"restriction": [80, 25],
|
||||
"multipolygon": [141, 25],
|
||||
"boundary": [200, 25],
|
||||
"route": [260, 25],
|
||||
"route-road": [320, 25],
|
||||
"route-bicycle": [380, 25],
|
||||
"route-foot": [440, 25],
|
||||
"route-bus": [500, 25],
|
||||
"route-train": [560, 25],
|
||||
"route-detour": [620, 25],
|
||||
"route-tram": [680, 25],
|
||||
"route-ferry": [740, 25],
|
||||
"route-power": [800, 25],
|
||||
"route-pipeline": [860, 25],
|
||||
"route-master": [920, 25],
|
||||
"restriction-no-straight-on": [980, 25],
|
||||
"restriction-no-u-turn": [1040, 25],
|
||||
"restriction-no-left-turn": [1100, 25],
|
||||
"restriction-no-right-turn": [1160, 25],
|
||||
"restriction-only-straight-on": [1220, 25],
|
||||
"restriction-only-left-turn": [1280, 25],
|
||||
"restriction-only-right-turn": [1340, 25]
|
||||
}
|
||||
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 221 KiB |
|
Before Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 181 KiB |
@@ -60,7 +60,8 @@ iD.ui.RadialMenu = function(context, operations) {
|
||||
.on('mouseout', mouseout);
|
||||
|
||||
button.append('use')
|
||||
.attr('transform', 'translate(-10, -10)')
|
||||
.attr('width', '20px')
|
||||
.attr('height', '20px')
|
||||
.attr('xlink:href', function(d) { return '#operation-' + d.id; });
|
||||
|
||||
tooltip = d3.select(document.body)
|
||||
|
||||
@@ -24,6 +24,32 @@
|
||||
"icon-full-screen": { "viewBox": "500 0 20 20" },
|
||||
"icon-collapse-screen": { "viewBox": "520 0 20 20" },
|
||||
|
||||
"icon-alert-shape": { "fill": "currentColor" },
|
||||
"icon-point-shape": { "fill": "currentColor" },
|
||||
"icon-line-shape": { "fill": "currentColor" },
|
||||
"icon-area-shape": { "fill": "currentColor" },
|
||||
"icon-undo-shape": { "fill": "currentColor" },
|
||||
"icon-redo-shape": { "fill": "currentColor" },
|
||||
"icon-apply-shape": { "fill": "currentColor" },
|
||||
"icon-save-shape": { "fill": "currentColor" },
|
||||
"icon-close-shape": { "fill": "currentColor" },
|
||||
"icon-out-link-shape": { "fill": "currentColor" },
|
||||
"icon-inspect-shape": { "fill": "currentColor" },
|
||||
"icon-plus-shape": { "fill": "currentColor" },
|
||||
"icon-minus-shape": { "fill": "currentColor" },
|
||||
"icon-search-shape": { "fill": "currentColor" },
|
||||
"icon-layers-shape": { "fill": "currentColor" },
|
||||
"icon-avatar-shape": { "fill": "currentColor" },
|
||||
"icon-nearby-shape": { "fill": "currentColor" },
|
||||
"icon-nearby-shape2": { "fill": "currentColor" },
|
||||
"icon-geolocate-shape": { "fill": "currentColor" },
|
||||
"icon-bug-shape": { "fill": "currentColor" },
|
||||
"icon-translate-shape": { "fill": "currentColor" },
|
||||
"icon-help-shape": { "fill": "currentColor" },
|
||||
"icon-data-shape": { "fill": "currentColor" },
|
||||
"icon-full-screen-shape": { "fill": "currentColor" },
|
||||
"icon-collapse-screen-shape": { "fill": "currentColor" },
|
||||
|
||||
"highway-motorway": { "viewBox": "0 20 60 60" },
|
||||
"highway-trunk": { "viewBox": "60 20 60 60" },
|
||||
"highway-primary": { "viewBox": "120 20 60 60" },
|
||||
@@ -104,18 +130,39 @@
|
||||
|
||||
"preset-icon-frame": { "viewBox": "340 320 45 45" },
|
||||
|
||||
"operation-delete": { "viewBox": "200 380 20 20" },
|
||||
"operation-circularize": { "viewBox": "220 380 20 20" },
|
||||
"operation-straighten": { "viewBox": "240 380 20 20" },
|
||||
"operation-split": { "viewBox": "260 380 20 20" },
|
||||
"operation-disconnect": { "viewBox": "280 380 20 20" },
|
||||
"operation-reverse": { "viewBox": "300 380 20 20" },
|
||||
"operation-move": { "viewBox": "320 380 20 20" },
|
||||
"operation-merge": { "viewBox": "340 380 20 20" },
|
||||
"operation-orthogonalize": { "viewBox": "360 380 20 20" },
|
||||
"operation-rotate": { "viewBox": "380 380 20 20" },
|
||||
"operation-simplify": { "viewBox": "400 380 20 20" },
|
||||
"operation-continue": { "viewBox": "420 380 20 20" },
|
||||
"operation-delete": { "viewBox": "200 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-circularize": { "viewBox": "220 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-straighten": { "viewBox": "240 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-split": { "viewBox": "260 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-disconnect": { "viewBox": "280 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-reverse": { "viewBox": "300 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-move": { "viewBox": "320 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-merge": { "viewBox": "340 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-orthogonalize": { "viewBox": "360 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-rotate": { "viewBox": "380 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-simplify": { "viewBox": "400 380 20 20", "x": "-10", "y": "-10" },
|
||||
"operation-continue": { "viewBox": "420 380 20 20", "x": "-10", "y": "-10" },
|
||||
|
||||
"operation-delete-shape": { "fill": "inherit" },
|
||||
"operation-circularize-shape": { "fill": "inherit" },
|
||||
"operation-circularize-shape2": { "fill": "currentColor" },
|
||||
"operation-straighten-shape": { "fill": "inherit" },
|
||||
"operation-straighten-shape2": { "fill": "currentColor" },
|
||||
"operation-split-shape": { "fill": "inherit" },
|
||||
"operation-disconnect-shape": { "fill": "inherit" },
|
||||
"operation-disconnect-shape2": { "fill": "currentColor" },
|
||||
"operation-reverse-shape": { "fill": "inherit" },
|
||||
"operation-move-shape": { "fill": "inherit" },
|
||||
"operation-move-shape2": { "fill": "currentColor" },
|
||||
"operation-merge-shape": { "fill": "inherit" },
|
||||
"operation-orthogonalize-shape": { "fill": "inherit" },
|
||||
"operation-orthogonalize-shape2": { "fill": "currentColor" },
|
||||
"operation-rotate-shape": { "fill": "inherit" },
|
||||
"operation-rotate-shape2": { "fill": "currentColor" },
|
||||
"operation-simplify-shape": { "fill": "inherit" },
|
||||
"operation-simplify-shape2": { "fill": "currentColor" },
|
||||
"operation-continue-shape": { "fill": "inherit" },
|
||||
"operation-continue-shape2": { "fill": "currentColor" },
|
||||
|
||||
"logo-twitter": { "viewBox": "200 400 60 60" },
|
||||
"logo-facebook": { "viewBox": "260 400 60 60" },
|
||||
@@ -126,6 +173,15 @@
|
||||
"logo-restore": { "viewBox": "500 480 80 80" },
|
||||
"logo-reset": { "viewBox": "580 480 80 80" },
|
||||
|
||||
"logo-twitter-shape": { "fill": "currentColor" },
|
||||
"logo-facebook-shape": { "fill": "currentColor" },
|
||||
"logo-google-shape": { "fill": "currentColor" },
|
||||
"logo-osm-shape": { "fill": "currentColor" },
|
||||
"logo-walkthrough-shape": { "fill": "currentColor" },
|
||||
"logo-features-shape": { "fill": "currentColor" },
|
||||
"logo-restore-shape": { "fill": "currentColor" },
|
||||
"logo-reset-shape": { "fill": "currentColor" },
|
||||
|
||||
"poi-images": { "viewBox": "0 320 200 80" },
|
||||
"landuse-images": { "viewBox": "0 400 200 80" },
|
||||
"feature-images": { "viewBox": "0 480 200 80" }
|
||||
|
||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 217 KiB |
@@ -10,7 +10,6 @@ if (argv.help || argv.h || !argv.svg || !argv.json) {
|
||||
var fs = require('fs');
|
||||
var json = JSON.parse(fs.readFileSync(argv.json));
|
||||
var _ = require('../js/lib/lodash.js');
|
||||
var path = require('path');
|
||||
var xml2js = require('xml2js');
|
||||
|
||||
xmlToJs(argv.svg, function (err, obj) {
|
||||
@@ -21,7 +20,6 @@ xmlToJs(argv.svg, function (err, obj) {
|
||||
});
|
||||
|
||||
function xmlToJs(filename, cb) {
|
||||
// var filepath = path.normalize(path.join(__dirname, filename));
|
||||
fs.readFile(filename, 'utf8', function (err, xmlStr) {
|
||||
if (err) throw (err);
|
||||
|
||||
@@ -38,7 +36,6 @@ function xmlToJs(filename, cb) {
|
||||
parser = new xml2js.Parser(opts);
|
||||
|
||||
parser.parseString(xmlStr, function (err, obj) {
|
||||
// console.log(JSON.stringify(obj, null, 2));
|
||||
cb(err, obj);
|
||||
});
|
||||
});
|
||||
|
||||