mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 17:23:02 +00:00
reworked background reset button.
This commit is contained in:
34
css/app.css
34
css/app.css
@@ -1439,23 +1439,13 @@ img.wiki-image {
|
||||
border-radius:0 4px 0 0;
|
||||
}
|
||||
|
||||
.background-control button.active {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.nudge-container {
|
||||
border-top: 1px solid #CCC;
|
||||
margin: 10px -10px -10px -10px;
|
||||
}
|
||||
|
||||
.background-control .adjustments button {
|
||||
background: white;
|
||||
text-transform: uppercase;
|
||||
border-color: #CCC;
|
||||
}
|
||||
|
||||
.background-control .adjustments button:hover {
|
||||
background:#ececec;
|
||||
.background-control .adjustments button:last-child {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.hide-toggle {
|
||||
@@ -1483,12 +1473,12 @@ img.wiki-image {
|
||||
border-left: 4px solid transparent;
|
||||
}
|
||||
|
||||
.background-control .nudge {
|
||||
text-indent: -9999px;
|
||||
overflow: hidden;
|
||||
width:16.6666%;
|
||||
.background-control .nudge-container button {
|
||||
float: left;
|
||||
display: block;
|
||||
width:20%;
|
||||
border-radius: 0;
|
||||
border-right: 1px solid rgba(0, 0, 0, .5);
|
||||
border-right: 1px solid #CCC;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
@@ -1526,15 +1516,6 @@ img.wiki-image {
|
||||
border-top: 5px solid #222;
|
||||
}
|
||||
|
||||
.background-control .nudge:first-child {
|
||||
border-radius: 4px 0 0 4px;
|
||||
}
|
||||
|
||||
.background-control .reset {
|
||||
width: 33.3333%;
|
||||
border-radius: 0 4px 4px 0;
|
||||
}
|
||||
|
||||
.opacity-options {
|
||||
background: url(../img/background-pattern-opacity.png) 0 0 repeat;
|
||||
height:20px;
|
||||
@@ -1566,6 +1547,7 @@ img.wiki-image {
|
||||
background: rgba(89, 123, 231, .5);
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.background-control li.selected:hover .select-box,
|
||||
.background-control li.selected .select-box {
|
||||
opacity: 1;
|
||||
|
||||
@@ -38,22 +38,22 @@
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8"
|
||||
inkscape:cx="292.29297"
|
||||
inkscape:cy="549.88029"
|
||||
inkscape:zoom="2.8284271"
|
||||
inkscape:cx="200.82099"
|
||||
inkscape:cy="540.68645"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer12"
|
||||
showgrid="true"
|
||||
inkscape:window-width="1483"
|
||||
inkscape:window-height="804"
|
||||
inkscape:window-x="790"
|
||||
inkscape:window-x="35"
|
||||
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"
|
||||
@@ -777,11 +777,6 @@
|
||||
id="path9870-1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
<path
|
||||
id="path10245"
|
||||
d="m 436,22.999997 -1,1 0,4 -4,0 -1,1 0,1 1,1 4,0 0,4 1,1 1,0 1,-1 0,-4 4,0 1,-1 0,-1 -1,-1 -4,0 0,-4 -1,-1 -1,0 z"
|
||||
style="opacity:0.5;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.79999375;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:0.5;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
@@ -2317,10 +2312,5 @@
|
||||
d="m 334.5,22.999997 -6.5,3 0,1 6.5,3 1,0 6.5,-3 0,-1 -6.5,-3 -1,0 z m -5.40625,6.5 -1.09375,0.5 0,1 6.5,3 1,0 6.5,-3 0,-1 -1.09375,-0.5 -5.40625,2.5 -1,0 -5.40625,-2.5 z m 0,4 -1.09375,0.5 0,1 6.5,3 1,0 6.5,-3 0,-1 -1.09375,-0.5 -5.40625,2.5 -1,0 -5.40625,-2.5 z"
|
||||
style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter8013-4);enable-background:accumulate"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
style="opacity:1;color:#000000;fill:#1a1a1a;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.79999375000000006;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
|
||||
d="m 436,2.999997 -1,1 0,4 -4,0 -1,1 0,1 1,1 4,0 0,4 1,1 1,0 1,-1 0,-4 4,0 1,-1 0,-1 -1,-1 -4,0 0,-4 -1,-1 -1,0 z"
|
||||
id="path4671" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
|
Before Width: | Height: | Size: 167 KiB After Width: | Height: | Size: 166 KiB |
@@ -292,23 +292,29 @@ iD.ui.Background = function(context) {
|
||||
|
||||
var nudge_container = adjustments
|
||||
.append('div')
|
||||
.attr('class', 'nudge-container')
|
||||
.attr('class', 'nudge-container cf')
|
||||
.style('display', 'none');
|
||||
|
||||
nudge_container.selectAll('button')
|
||||
.data(directions).enter()
|
||||
.append('button')
|
||||
.attr('class', function(d) { return d[0] + ' nudge'; })
|
||||
.text(function(d) { return d[0]; })
|
||||
.on('mousedown', clickNudge);
|
||||
|
||||
nudge_container.append('button')
|
||||
.text(t('background.reset'))
|
||||
resetButton = nudge_container.append('button')
|
||||
.attr('class', 'reset')
|
||||
.on('click', function() {
|
||||
context.background().offset([0, 0]);
|
||||
context.redraw();
|
||||
});
|
||||
})
|
||||
|
||||
resetButton.append('div')
|
||||
.attr('class','icon undo');
|
||||
|
||||
resetButton.call(bootstrap.tooltip()
|
||||
.title(t('background.reset'))
|
||||
.placement('right'));
|
||||
|
||||
|
||||
context.map()
|
||||
.on('move.background-update', _.debounce(update, 1000));
|
||||
|
||||
Reference in New Issue
Block a user