diff --git a/css/80_app.css b/css/80_app.css index 9371b5350..9948bd407 100644 --- a/css/80_app.css +++ b/css/80_app.css @@ -987,10 +987,15 @@ a.hide-toggle { .preset-icon-line path.line { cursor: inherit; } -.preset-icon-line circle.vertex { +.preset-icon-line circle.vertex, +.preset-icon-fill circle.vertex { fill: #fff; stroke: rgba(0, 0, 0, 0.25); } +.preset-icon-fill circle.midpoint { + fill: transparent; + stroke: rgba(0, 0, 0, 0.25); +} /* use a consistent stroke width */ .preset-icon-line path.line.stroke { stroke-width: 2 !important; @@ -1018,19 +1023,6 @@ a.hide-toggle { fill: #efefef; backface-visibility: hidden; } -.preset-icon-frame { - width: 100%; - height:100%; - position: absolute; -} -.preset-icon-frame .icon{ - position: absolute; - top: 12%; - left: 12%; - width: 76%; - height: 76%; - margin: auto; -} .preset-icon { width: 100%; diff --git a/modules/ui/preset_icon.js b/modules/ui/preset_icon.js index daaa2110b..c421561d4 100644 --- a/modules/ui/preset_icon.js +++ b/modules/ui/preset_icon.js @@ -56,6 +56,28 @@ export function uiPresetIcon() { fillEnter.append('path') .attr('d', data) .attr('class', 'line area stroke'); + + var r = 2.5; + var coordinates = [c1, c2]; + for (var xIndex in coordinates) { + for (var yIndex in coordinates) { + fillEnter.append('circle') + .attr('class', 'vertex') + .attr('cx', coordinates[xIndex]) + .attr('cy', coordinates[yIndex]) + .attr('r', r); + } + } + + var midCoordinates = [[c1, w/2], [c2, w/2], [h/2, c1], [h/2, c2]]; + for (var index in midCoordinates) { + var loc = midCoordinates[index]; + fillEnter.append('circle') + .attr('class', 'midpoint') + .attr('cx', loc[0]) + .attr('cy', loc[1]) + .attr('r', 1.25); + } } function renderLine(lineEnter) { @@ -165,18 +187,6 @@ export function uiPresetIcon() { .attr('class', 'line casing ' + tagClasses); - var areaFrame = container.selectAll('.preset-icon-frame') - .data((geom === 'area') ? [0] : []); - - areaFrame.exit() - .remove(); - - areaFrame = areaFrame.enter() - .append('div') - .attr('class', 'preset-icon-frame') - .call(svgIcon('#iD-preset-icon-frame')); - - var icon = container.selectAll('.preset-icon') .data([0]); diff --git a/svg/iD-sprite/graphics/preset-icon-frame.svg b/svg/iD-sprite/graphics/preset-icon-frame.svg deleted file mode 100644 index b14ba48f7..000000000 --- a/svg/iD-sprite/graphics/preset-icon-frame.svg +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - -