From cc1bb50f0bcc19e4ece80bf6922adde31cf0ae74 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 15 Mar 2013 14:45:07 -0700 Subject: [PATCH 1/5] Fix shadow pointer events --- css/map.css | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/css/map.css b/css/map.css index 4f49b09b3..a8f9b997e 100644 --- a/css/map.css +++ b/css/map.css @@ -27,11 +27,20 @@ use { pointer-events: none; } +g.point .shadow, +g.vertex .shadow, +g.midpoint .shadow { + pointer-events: all; +} + +path.shadow { + pointer-events: stroke; +} + g.point .shadow, g.vertex .shadow, g.midpoint .shadow, path.shadow { - pointer-events: all; -webkit-transition: 200ms; -moz-transition: 200ms; transition: 200ms; From ff85d57b8250ab8dbd92fc5c33062c7c89d76e57 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Fri, 15 Mar 2013 14:49:57 -0700 Subject: [PATCH 2/5] Simplify --- css/map.css | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/css/map.css b/css/map.css index a8f9b997e..18e37c010 100644 --- a/css/map.css +++ b/css/map.css @@ -37,19 +37,12 @@ path.shadow { pointer-events: stroke; } -g.point .shadow, -g.vertex .shadow, -g.midpoint .shadow, -path.shadow { +.shadow { -webkit-transition: 200ms; -moz-transition: 200ms; transition: 200ms; } -path.shadow { - pointer-events: stroke; -} - /* points */ g.point .stroke { From 9abc0cd9a7d145e5869f0d2fb7ed675afaaebf1e Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 15 Mar 2013 18:02:44 -0400 Subject: [PATCH 3/5] make background and geocoder exclusive --- js/id/ui/background.js | 14 +++++++++++--- js/id/ui/geocoder.js | 13 +++++++++---- 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/js/id/ui/background.js b/js/id/ui/background.js index 5ea9d963b..7daab1dbe 100644 --- a/js/id/ui/background.js +++ b/js/id/ui/background.js @@ -44,14 +44,22 @@ iD.ui.Background = function(context) { button.classed('active', show); content.call(iD.ui.Toggle(show)); shown = show; + + if (show) { + selection.on('mousedown.background-inside', function() { + return d3.event.stopPropagation(); + }); + } else { + selection.on('mousedown.background-inside', null); + } } } - selection.on('mousedown.background-inside', function() { - return d3.event.stopPropagation(); + context.surface().on('mousedown.background-outside', function() { + setVisible(false); }); - context.surface().on('mousedown.background-outside', function() { + context.container().on('mousedown.background-outside', function() { setVisible(false); }); diff --git a/js/id/ui/geocoder.js b/js/id/ui/geocoder.js index d73c19dce..773815e53 100644 --- a/js/id/ui/geocoder.js +++ b/js/id/ui/geocoder.js @@ -86,6 +86,14 @@ iD.ui.Geocoder = function(context) { if (show) inputNode.node().focus(); else inputNode.node().blur(); shown = show; + + if (show) { + selection.on('mousedown.geocoder-inside', function() { + return d3.event.stopPropagation(); + }); + } else { + selection.on('mousedown.geocoder-inside', null); + } } } var tooltip = bootstrap.tooltip() @@ -112,11 +120,8 @@ iD.ui.Geocoder = function(context) { var resultsList = selection.append('div') .attr('class', 'content fillD map-overlay hide'); - selection.on('mousedown.geocoder-inside', function() { - return d3.event.stopPropagation(); - }); - context.surface().on('mousedown.geocoder-outside', hide); + context.container().on('mousedown.b.geocoder-outside', hide); var keybinding = d3.keybinding('geocoder'); From 3606ccf85fe4cb1ee0d8cf1059ee5535399d27cd Mon Sep 17 00:00:00 2001 From: Ansis Brammanis Date: Fri, 15 Mar 2013 18:18:57 -0400 Subject: [PATCH 4/5] use local english source in `make translate` --- data/update_locales.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/data/update_locales.js b/data/update_locales.js index bc9942af9..91c9b2b6c 100644 --- a/data/update_locales.js +++ b/data/update_locales.js @@ -20,13 +20,17 @@ var project = api + 'project/id-editor/'; var auth = JSON.parse(fs.readFileSync('./transifex.auth', 'utf8')); +var sourceCore = yaml.load(fs.readFileSync('./data/core.yaml', 'utf8')), + sourcePresets = yaml.load(fs.readFileSync('./data/presets.yaml', 'utf8')); + asyncMap(resources, getResource, function(err, locales) { if (err) return console.log(err); var out = ''; - var locale = {}; + var locale = _.merge(sourceCore, sourcePresets); locales.forEach(function(l) { locale = _.merge(locale, l); }); + for (var i in locale) { out += 'locale.' + i + ' = ' + JSON.stringify(locale[i], null, 4) + ';'; } @@ -68,6 +72,8 @@ function getLanguages(resource, callback) { if (err) return callback(err); callback(null, JSON.parse(body).available_languages.map(function(d) { return d.code; + }).filter(function(d) { + return d !== 'en'; })); }); } From efddb5c8ed050206df736277260c8c96de869820 Mon Sep 17 00:00:00 2001 From: saman bb Date: Fri, 15 Mar 2013 18:25:24 -0400 Subject: [PATCH 5/5] we already have a clearfix, class is cf --- css/app.css | 21 +-------------------- js/id/ui/preset_grid.js | 2 +- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/css/app.css b/css/app.css index 6c157c00b..f25ec897c 100644 --- a/css/app.css +++ b/css/app.css @@ -2089,23 +2089,4 @@ a.success-action { } ::-webkit-scrollbar-corner { background: transparent -} - -/* clearfix */ -.clearfix:after { - content: "."; - display: block; - clear: both; - visibility: hidden; - line-height: 0; - height: 0; -} -.clearfix { - display: inline-block; -} -html[xmlns] .clearfix { - display: block; -} -* html .clearfix { - height: 1%; -} +} \ No newline at end of file diff --git a/js/id/ui/preset_grid.js b/js/id/ui/preset_grid.js index dd17f756e..fcf8d2ffc 100644 --- a/js/id/ui/preset_grid.js +++ b/js/id/ui/preset_grid.js @@ -22,7 +22,7 @@ iD.ui.PresetGrid = function(context) { .attr('class', 'fillL inspector-body inspector-body-' + entity.geometry(context.graph())); var grid = gridwrap.append('div') - .attr('class', 'preset-grid fillL clearfix') + .attr('class', 'preset-grid fillL cf') .data([context.presets().defaults(entity, 36).collection]); var show_more = gridwrap.append('div')