From 9e8ae253395a65ae20d4ac928feca6a1f9a3915c Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Tue, 14 May 2013 15:33:24 -0400 Subject: [PATCH 1/4] styles for check-boxes. Closes #1297 --- css/app.css | 31 +++++--- dist/img/sprite.svg | 170 ++++++++++++++++++++++++----------------- js/id/ui/background.js | 4 +- 3 files changed, 122 insertions(+), 83 deletions(-) diff --git a/css/app.css b/css/app.css index d7ac60fb7..138fa3b1b 100644 --- a/css/app.css +++ b/css/app.css @@ -234,7 +234,7 @@ ul.toggle-list { ul.toggle-list li a { position: relative; - padding: 5px 10px 5px 25px; + padding: 5px 10px 5px 30px; display:block; border-top: 1px solid #ccc; } @@ -273,13 +273,13 @@ ul.link-list li:last-child { content: ""; display: inline-block; border-radius: 50%; - height: 12px; - width: 12px; + height: 16px; + width: 16px; margin-right: 10px; border: 1px solid #CCC; position: absolute; left: 5px; - top: 8px; + top: 5px; } .toggle-list a:hover::before { @@ -291,6 +291,19 @@ ul.link-list li:last-child { box-shadow: inset 0 0 0 2px white; } +.toggle-list.check-list a::before { + border-radius: 2px; +} + +.toggle-list.check-list a:hover::before { + background: white url(img/sprite.svg) no-repeat -480px -0px; + box-shadow: none; +} + +.toggle-list.check-list a.selected::before { + background: white url(img/sprite.svg) no-repeat -480px -20px; +} + /* Utility Classes ------------------------------------------------------- */ .fillL { @@ -1065,7 +1078,7 @@ input[type=number] { } .spin-control button.decrement::after, -.spin-control button.increment::after { +.spin-control button.increment` { content:""; height: 0; width: 0; position: absolute; @@ -1124,20 +1137,20 @@ input[type=number] { border-bottom: 1px solid #CCC; color: #7092FF; width: 100%; - padding-left: 25px; + padding-left: 30px; } .radio-wrap button::before { content: ""; display: inline-block; border-radius: 50%; - height: 12px; - width: 12px; + height: 16px; + width: 16px; margin-right: 10px; border: 1px solid #CCC; position: absolute; left: 5px; - top: 8px; + top: 5px; } .radio-wrap button:hover::before { diff --git a/dist/img/sprite.svg b/dist/img/sprite.svg index 680ef2ce2..7c4d05738 100644 --- a/dist/img/sprite.svg +++ b/dist/img/sprite.svg @@ -38,22 +38,22 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="18.189894" - inkscape:cx="263.82239" - inkscape:cy="300.42147" + inkscape:zoom="16" + inkscape:cx="471.57386" + inkscape:cy="545.41375" inkscape:document-units="px" inkscape:current-layer="layer12" showgrid="true" - inkscape:window-width="1483" - inkscape:window-height="804" - inkscape:window-x="35" + inkscape:window-width="1280" + inkscape:window-height="756" + inkscape:window-x="56" inkscape:window-y="0" inkscape:window-maximized="0" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" - showguides="false" + showguides="true" inkscape:guide-bbox="true" inkscape:snap-bbox="true" inkscape:snap-nodes="true" @@ -228,7 +228,7 @@ image/svg+xml - + @@ -377,13 +377,6 @@ id="path3769" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccc" /> - @@ -925,7 +918,7 @@ transform="translate(10.000004,-1.9999957)"> @@ -959,11 +952,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-411.98649,15.371188)" /> @@ -1015,11 +1008,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-410.98649,15.371188)" /> @@ -1099,11 +1092,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-410.98649,14.371188)" /> @@ -1149,7 +1142,7 @@ transform="translate(10.000004,-1.9999957)"> @@ -1183,11 +1176,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-411.98649,15.371188)" /> @@ -1239,11 +1232,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-410.98649,15.371188)" /> @@ -1338,11 +1331,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-410.98649,14.371188)" /> @@ -1388,7 +1381,7 @@ transform="translate(10.000004,-1.9999957)"> @@ -1422,11 +1415,11 @@ sodipodi:cy="-129.34375" sodipodi:rx="3.46875" sodipodi:ry="3.46875" - d="m 106.03125,-129.34375 a 3.46875,3.46875 0 1 1 -6.9375,0 3.46875,3.46875 0 1 1 6.9375,0 z" + d="m 106.03125,-129.34375 c 0,1.91574 -1.55301,3.46875 -3.46875,3.46875 -1.91574,0 -3.46875,-1.55301 -3.46875,-3.46875 0,-1.91574 1.55301,-3.46875 3.46875,-3.46875 1.91574,0 3.46875,1.55301 3.46875,3.46875 z" transform="matrix(1.009009,0,0,1.009009,-411.98649,15.371188)" /> + + + + + + diff --git a/js/id/ui/background.js b/js/id/ui/background.js index 5fa0bf25a..56f239f4c 100644 --- a/js/id/ui/background.js +++ b/js/id/ui/background.js @@ -240,12 +240,12 @@ iD.ui.Background = function(context) { var overlayList = content .append('ul') - .attr('class', 'toggle-list'); + .attr('class', 'toggle-list check-list'); var gpxLayerItem = content .append('ul') .style('display', iD.detect().filedrop ? 'block' : 'none') - .attr('class', 'toggle-list') + .attr('class', 'toggle-list check-list') .append('li') .append('a') .classed('layer-toggle-gpx', true) From 60753670153f86ee6339d8e4cff4e89c73601ca9 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 14 May 2013 20:47:58 -0700 Subject: [PATCH 2/4] Don't store unused parts of OSM XML --- js/id/core/connection.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/js/id/core/connection.js b/js/id/core/connection.js index d4116b992..e265436e4 100644 --- a/js/id/core/connection.js +++ b/js/id/core/connection.js @@ -100,11 +100,7 @@ iD.Connection = function() { id: iD.Entity.id.fromOSM(nodeStr, attrs.id.nodeValue), loc: [parseFloat(attrs.lon.nodeValue), parseFloat(attrs.lat.nodeValue)], version: attrs.version.nodeValue, - changeset: attrs.changeset.nodeValue, user: attrs.user && attrs.user.nodeValue, - uid: attrs.uid && attrs.uid.nodeValue, - visible: attrs.visible.nodeValue, - timestamp: attrs.timestamp.nodeValue, tags: getTags(obj) }); }, @@ -114,11 +110,7 @@ iD.Connection = function() { return new iD.Way({ id: iD.Entity.id.fromOSM(wayStr, attrs.id.nodeValue), version: attrs.version.nodeValue, - changeset: attrs.changeset.nodeValue, user: attrs.user && attrs.user.nodeValue, - uid: attrs.uid && attrs.uid.nodeValue, - visible: attrs.visible.nodeValue, - timestamp: attrs.timestamp.nodeValue, tags: getTags(obj), nodes: getNodes(obj) }); @@ -129,11 +121,7 @@ iD.Connection = function() { return new iD.Relation({ id: iD.Entity.id.fromOSM(relationStr, attrs.id.nodeValue), version: attrs.version.nodeValue, - changeset: attrs.changeset.nodeValue, user: attrs.user && attrs.user.nodeValue, - uid: attrs.uid && attrs.uid.nodeValue, - visible: attrs.visible.nodeValue, - timestamp: attrs.timestamp.nodeValue, tags: getTags(obj), members: getMembers(obj) }); From c4f4ee1313b218cc8ab2d5256f8b1a53cd34331a Mon Sep 17 00:00:00 2001 From: Saman Bemel-Benrud Date: Wed, 15 May 2013 13:00:00 -0400 Subject: [PATCH 3/4] fixed typo. --- css/app.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css/app.css b/css/app.css index 138fa3b1b..2b956888b 100644 --- a/css/app.css +++ b/css/app.css @@ -1078,7 +1078,7 @@ input[type=number] { } .spin-control button.decrement::after, -.spin-control button.increment` { +.spin-control button.increment::after { content:""; height: 0; width: 0; position: absolute; From 2045d884c611aaa8c931102667ff2ca00cc214c2 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Wed, 15 May 2013 15:35:54 -0700 Subject: [PATCH 4/4] Set projection precision to 0 Might fix #1270 --- js/id/renderer/map.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/id/renderer/map.js b/js/id/renderer/map.js index 08c1271b3..1394c75a0 100644 --- a/js/id/renderer/map.js +++ b/js/id/renderer/map.js @@ -1,7 +1,9 @@ iD.Map = function(context) { var dimensions = [1, 1], dispatch = d3.dispatch('move', 'drawn'), - projection = d3.geo.mercator().scale(512 / Math.PI), + projection = d3.geo.mercator() + .scale(512 / Math.PI) + .precision(0), roundedProjection = iD.svg.RoundProjection(projection), zoom = d3.behavior.zoom() .translate(projection.translate())