More cleanups to iD-sprite and styles, remove old png and json files

This commit is contained in:
Bryan Housel
2015-10-29 23:18:21 -04:00
parent 6618395f8c
commit d5dcc1ff1a
20 changed files with 2390 additions and 2721 deletions
+4 -6
View File
@@ -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();
File diff suppressed because one or more lines are too long
-47
View File
@@ -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]
}
-26
View File
@@ -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));
-21
View File
@@ -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]
}
-25
View File
@@ -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]
}