Merge branch 'master' into lodash-es

This commit is contained in:
Bryan Housel
2017-09-27 14:47:31 -04:00
committed by GitHub
26 changed files with 628 additions and 8 deletions
+67
View File
@@ -1041,6 +1041,15 @@ en:
label: Power Output
# plant/output/electricity field placeholder
placeholder: '500 MW, 1000 MW, 2000 MW...'
playground/baby:
# baby=*
label: Baby Seat
playground/max_age:
# max_age=*
label: Maximum Age
playground/min_age:
# max_age=*
label: Minimum Age
population:
# population=*
label: Population
@@ -3962,6 +3971,64 @@ en:
# place=village
name: Village
terms: '<translate with synonyms or related terms for ''Village'', separated by commas>'
playground/balance_beam:
# playground=balancebeam
name: Balance Beam
terms: '<translate with synonyms or related terms for ''Balance Beam'', separated by commas>'
playground/basket_spinner:
# playground=basketrotator
name: Basket Spinner
# 'terms: basket rotator'
terms: '<translate with synonyms or related terms for ''Basket Spinner'', separated by commas>'
playground/basket_swing:
# playground=basketswing
name: Basket Swing
terms: '<translate with synonyms or related terms for ''Basket Swing'', separated by commas>'
playground/climbing_frame:
# playground=climbingframe
name: Climbing Frame
terms: '<translate with synonyms or related terms for ''Climbing Frame'', separated by commas>'
playground/cushion:
# playground=cushion
name: Bouncy Cushion
terms: '<translate with synonyms or related terms for ''Bouncy Cushion'', separated by commas>'
playground/horizontal_bar:
# playground=horizontal_bar
name: Horizontal Bar
# 'terms: high bar'
terms: '<translate with synonyms or related terms for ''Horizontal Bar'', separated by commas>'
playground/rocker:
# playground=springy
name: Springy Rocker
terms: '<translate with synonyms or related terms for ''Springy Rocker'', separated by commas>'
playground/roundabout:
# playground=roundabout
name: Play Roundabout
terms: '<translate with synonyms or related terms for ''Play Roundabout'', separated by commas>'
playground/sandpit:
# playground=sandpit
name: Sandpit
terms: '<translate with synonyms or related terms for ''Sandpit'', separated by commas>'
playground/seesaw:
# playground=seesaw
name: Seesaw
terms: '<translate with synonyms or related terms for ''Seesaw'', separated by commas>'
playground/slide:
# playground=slide
name: Slide
terms: '<translate with synonyms or related terms for ''Slide'', separated by commas>'
playground/structure:
# playground=structure
name: Play Structure
terms: '<translate with synonyms or related terms for ''Play Structure'', separated by commas>'
playground/swing:
# playground=swing
name: Swing
terms: '<translate with synonyms or related terms for ''Swing'', separated by commas>'
playground/zipwire:
# playground=zipwire
name: Zip Wire
terms: '<translate with synonyms or related terms for ''Zip Wire'', separated by commas>'
point:
name: Point
terms: '<translate with synonyms or related terms for ''Point'', separated by commas>'
+15
View File
@@ -1383,6 +1383,21 @@
"label": "Power Output",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"playground/baby": {
"key": "baby",
"type": "check",
"label": "Baby Seat"
},
"playground/max_age": {
"key": "max_age",
"type": "number",
"label": "Maximum Age"
},
"playground/min_age": {
"key": "max_age",
"type": "number",
"label": "Minimum Age"
},
"population": {
"key": "population",
"type": "text",
+5
View File
@@ -0,0 +1,5 @@
{
"key": "baby",
"type": "check",
"label": "Baby Seat"
}
@@ -0,0 +1,5 @@
{
"key": "max_age",
"type": "number",
"label": "Maximum Age"
}
@@ -0,0 +1,5 @@
{
"key": "max_age",
"type": "number",
"label": "Minimum Age"
}
+188
View File
@@ -9492,6 +9492,14 @@
},
"leisure/playground": {
"icon": "playground",
"fields": [
"name",
"operator",
"surface",
"playground/max_age",
"playground/min_age",
"access_simple"
],
"geometry": [
"point",
"area"
@@ -11476,6 +11484,170 @@
},
"name": "Village"
},
"playground/balance_beam": {
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "balancebeam"
},
"name": "Balance Beam"
},
"playground/basket_spinner": {
"icon": "playground",
"geometry": [
"point"
],
"terms": [
"basket rotator"
],
"tags": {
"playground": "basketrotator"
},
"name": "Basket Spinner"
},
"playground/basket_swing": {
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "basketswing"
},
"name": "Basket Swing"
},
"playground/climbing_frame": {
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "climbingframe"
},
"name": "Climbing Frame"
},
"playground/cushion": {
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "cushion"
},
"name": "Bouncy Cushion"
},
"playground/horizontal_bar": {
"icon": "pitch",
"fields": [
"height"
],
"geometry": [
"point"
],
"terms": [
"high bar"
],
"tags": {
"playground": "horizontal_bar"
},
"name": "Horizontal Bar"
},
"playground/rocker": {
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "springy"
},
"name": "Springy Rocker"
},
"playground/roundabout": {
"icon": "stadium",
"fields": [
"bench"
],
"geometry": [
"point",
"area"
],
"tags": {
"playground": "roundabout"
},
"name": "Play Roundabout"
},
"playground/sandpit": {
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "sandpit"
},
"name": "Sandpit"
},
"playground/seesaw": {
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "seesaw"
},
"name": "Seesaw"
},
"playground/slide": {
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "slide"
},
"name": "Slide"
},
"playground/structure": {
"icon": "pitch",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "structure"
},
"name": "Play Structure"
},
"playground/swing": {
"icon": "playground",
"fields": [
"playground/baby",
"wheelchair"
],
"geometry": [
"point"
],
"tags": {
"playground": "swing"
},
"name": "Swing"
},
"playground/zipwire": {
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "zipwire"
},
"name": "Zip Wire"
},
"point": {
"fields": [
"name"
@@ -56168,6 +56340,14 @@
"point",
"area"
],
"fields": [
"name",
"operator",
"surface",
"playground/max_age",
"playground/min_age",
"access_simple"
],
"suggestion": true
},
"leisure/playground/놀이터": {
@@ -56181,6 +56361,14 @@
"point",
"area"
],
"fields": [
"name",
"operator",
"surface",
"playground/max_age",
"playground/min_age",
"access_simple"
],
"suggestion": true
},
"leisure/sports_centre/Anytime Fitness": {
@@ -1,5 +1,13 @@
{
"icon": "playground",
"fields": [
"name",
"operator",
"surface",
"playground/max_age",
"playground/min_age",
"access_simple"
],
"geometry": [
"point",
"area"
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "balancebeam"
},
"name": "Balance Beam"
}
@@ -0,0 +1,13 @@
{
"icon": "playground",
"geometry": [
"point"
],
"terms": [
"basket rotator"
],
"tags": {
"playground": "basketrotator"
},
"name": "Basket Spinner"
}
@@ -0,0 +1,10 @@
{
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "basketswing"
},
"name": "Basket Swing"
}
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "climbingframe"
},
"name": "Climbing Frame"
}
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "cushion"
},
"name": "Bouncy Cushion"
}
@@ -0,0 +1,16 @@
{
"icon": "pitch",
"fields": [
"height"
],
"geometry": [
"point"
],
"terms": [
"high bar"
],
"tags": {
"playground": "horizontal_bar"
},
"name": "Horizontal Bar"
}
@@ -0,0 +1,10 @@
{
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "springy"
},
"name": "Springy Rocker"
}
@@ -0,0 +1,14 @@
{
"icon": "stadium",
"fields": [
"bench"
],
"geometry": [
"point",
"area"
],
"tags": {
"playground": "roundabout"
},
"name": "Play Roundabout"
}
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "sandpit"
},
"name": "Sandpit"
}
@@ -0,0 +1,10 @@
{
"icon": "playground",
"geometry": [
"point"
],
"tags": {
"playground": "seesaw"
},
"name": "Seesaw"
}
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "slide"
},
"name": "Slide"
}
@@ -0,0 +1,11 @@
{
"icon": "pitch",
"geometry": [
"point",
"area"
],
"tags": {
"playground": "structure"
},
"name": "Play Structure"
}
@@ -0,0 +1,14 @@
{
"icon": "playground",
"fields": [
"playground/baby",
"wheelchair"
],
"geometry": [
"point"
],
"tags": {
"playground": "swing"
},
"name": "Swing"
}
@@ -0,0 +1,11 @@
{
"icon": "playground",
"geometry": [
"point",
"line"
],
"tags": {
"playground": "zipwire"
},
"name": "Zip Wire"
}
+56
View File
@@ -2220,6 +2220,62 @@
"key": "place",
"value": "village"
},
{
"key": "playground",
"value": "balancebeam"
},
{
"key": "playground",
"value": "basketrotator"
},
{
"key": "playground",
"value": "basketswing"
},
{
"key": "playground",
"value": "climbingframe"
},
{
"key": "playground",
"value": "cushion"
},
{
"key": "playground",
"value": "horizontal_bar"
},
{
"key": "playground",
"value": "springy"
},
{
"key": "playground",
"value": "roundabout"
},
{
"key": "playground",
"value": "sandpit"
},
{
"key": "playground",
"value": "seesaw"
},
{
"key": "playground",
"value": "slide"
},
{
"key": "playground",
"value": "structure"
},
{
"key": "playground",
"value": "swing"
},
{
"key": "playground",
"value": "zipwire"
},
{
"key": "power",
"value": "sub_station"
+24 -1
View File
@@ -9,11 +9,33 @@ var json = require('rollup-plugin-json');
var http = require('http');
var gaze = require('gaze');
var ecstatic = require('ecstatic');
var glob = require('glob');
var concat = require('concat-files');
function makeCSS() {
glob('css/**/*.css', function (er, files) {
if (er) console.error(er);
concat(files, 'dist/iD.css', function (err) {
if (err) console.error(err);
console.log('css built');
});
});
}
var building = false;
var cache;
if (process.argv[2] === 'develop') {
var isDevelopment = process.argv[2] === 'develop';
if (isDevelopment) {
build();
makeCSS();
gaze(['css/**/*.css'], function(err, watcher) {
watcher.on('all', function() {
makeCSS();
});
});
gaze(['modules/**/*.js', 'data/**/*.{js,json}'], function(err, watcher) {
watcher.on('all', function() {
@@ -29,6 +51,7 @@ if (process.argv[2] === 'develop') {
} else {
build();
makeCSS();
}
+65
View File
@@ -1955,6 +1955,15 @@
"label": "Power Output",
"placeholder": "500 MW, 1000 MW, 2000 MW..."
},
"playground/baby": {
"label": "Baby Seat"
},
"playground/max_age": {
"label": "Maximum Age"
},
"playground/min_age": {
"label": "Minimum Age"
},
"population": {
"label": "Population"
},
@@ -4572,6 +4581,62 @@
"name": "Village",
"terms": ""
},
"playground/balance_beam": {
"name": "Balance Beam",
"terms": ""
},
"playground/basket_spinner": {
"name": "Basket Spinner",
"terms": "basket rotator"
},
"playground/basket_swing": {
"name": "Basket Swing",
"terms": ""
},
"playground/climbing_frame": {
"name": "Climbing Frame",
"terms": ""
},
"playground/cushion": {
"name": "Bouncy Cushion",
"terms": ""
},
"playground/horizontal_bar": {
"name": "Horizontal Bar",
"terms": "high bar"
},
"playground/rocker": {
"name": "Springy Rocker",
"terms": ""
},
"playground/roundabout": {
"name": "Play Roundabout",
"terms": ""
},
"playground/sandpit": {
"name": "Sandpit",
"terms": ""
},
"playground/seesaw": {
"name": "Seesaw",
"terms": ""
},
"playground/slide": {
"name": "Slide",
"terms": ""
},
"playground/structure": {
"name": "Play Structure",
"terms": ""
},
"playground/swing": {
"name": "Swing",
"terms": ""
},
"playground/zipwire": {
"name": "Zip Wire",
"terms": ""
},
"point": {
"name": "Point",
"terms": ""
+22 -3
View File
@@ -1,5 +1,4 @@
/* global Mapillary:false */
import _compact from 'lodash-es/compact';
import _filter from 'lodash-es/filter';
import _find from 'lodash-es/find';
import _flatten from 'lodash-es/flatten';
@@ -256,11 +255,31 @@ function searchLimited(psize, limit, projection, rtree) {
limit = limit || 3;
var partitions = partitionViewport(psize, projection);
return _flatten(_compact(_map(partitions, function(extent) {
var results;
// console.time('previous');
results = _flatten(_map(partitions, function(extent) {
return rtree.search(extent.bbox())
.slice(0, limit)
.map(function(d) { return d.data; });
})));
}));
// console.timeEnd('previous');
// console.time('new');
// results = partitions.reduce(function(result, extent) {
// var found = rtree.search(extent.bbox())
// .map(function(d) { return d.data; })
// .sort(function(a, b) {
// return a.loc[1] - b.loc[1];
// // return a.key.localeCompare(b.key);
// })
// .slice(0, limit);
// return (found.length ? result.concat(found) : result);
// }, []);
// console.timeEnd('new');
return results;
}
+4 -4
View File
@@ -14,7 +14,6 @@
"build": "node build.js && node development_server.js",
"clean": "shx rm -f dist/*.js dist/*.map dist/*.css dist/img/*.svg",
"dist": "npm-run-all -p dist:**",
"dist:css": "shx cat css/*.css > dist/iD.css",
"dist:mapillary": "shx mkdir -p dist/mapillary-js && shx cp -R node_modules/mapillary-js/dist/* dist/mapillary-js/",
"dist:min": "uglifyjs dist/iD.js -c warnings=false -m -o dist/iD.min.js",
"dist:svg:maki": "svg-sprite --symbol --symbol-dest . --symbol-sprite dist/img/maki-sprite.svg node_modules/@mapbox/maki/icons/*.svg",
@@ -37,20 +36,21 @@
"wmf-sitematrix": "0.1.4"
},
"devDependencies": {
"@mapbox/maki": "^4.0.0",
"brfs": "1.4.3",
"chai": "^4.1.0",
"concat-files": "^0.1.1",
"d3": "4.10.2",
"ecstatic": "^3.0.0",
"editor-layer-index": "osmlab/editor-layer-index.git#gh-pages",
"gaze": "^1.1.1",
"eslint": "^4.3.0",
"gaze": "^1.1.1",
"glob": "^7.1.0",
"happen": "^0.3.1",
"js-yaml": "^3.9.0",
"jsonschema": "^1.1.0",
"json-stable-stringify": "^1.0.1",
"lodash": "^4.17.0",
"@mapbox/maki": "^4.0.0",
"jsonschema": "^1.1.0",
"mapillary-js": "2.8.0",
"minimist": "^1.2.0",
"mocha": "^3.4.0",