Adjust padding and sizing constants, return to col4 sidebar

I really want the sidebar back to col4, so the user sees more main map.
This makes it very tricky to fit all of the intersection in the turn
restriction editor.
This commit is contained in:
Bryan Housel
2018-02-12 15:35:45 -05:00
parent c9dac22218
commit 1174424f50
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ export function svgTurns(projection) {
var p = projection(v.loc);
var q = projection(t.loc);
var mid = geoVecLength(p, q) / 2;
var r = turn.u ? 0 : Math.min(mid, 40);
var r = turn.u ? 0 : Math.min(mid, 50);
return 'translate(' + (r * Math.cos(a) + p[0]) + ',' + (r * Math.sin(a) + p[1]) + ') ' +
'rotate(' + a * 180 / Math.PI + ')';
+1 -1
View File
@@ -178,7 +178,7 @@ export function uiFieldRestrictions(field, context) {
// If this is a large intersection, adjust zoom to fit extent
if (_intersection.vertices.length > 1) {
var padding = 220;
var padding = 150; // in z22 pixels
var tl = projection([extent[0][0], extent[1][1]]);
var br = projection([extent[1][0], extent[0][1]]);
var hFactor = (br[0] - tl[0]) / (d[0] - padding);
+2 -2
View File
@@ -68,7 +68,7 @@ export function uiInit(context) {
container
.append('div')
.attr('id', 'sidebar')
.attr('class', 'col5')
.attr('class', 'col4')
.call(ui.sidebar);
var content = container
@@ -94,7 +94,7 @@ export function uiInit(context) {
bar
.append('div')
.attr('class', 'spacer col5');
.attr('class', 'spacer col4');
var limiter = bar.append('div')
.attr('class', 'limiter');