mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
11
css/app.css
11
css/app.css
@@ -2042,6 +2042,17 @@ div.full-screen > button:hover {
|
||||
right: -10px;
|
||||
}
|
||||
|
||||
.nudge-surface {
|
||||
position: absolute;
|
||||
z-index: 5000;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: transparent;
|
||||
cursor: move;
|
||||
}
|
||||
|
||||
.background-control .nudge.right::after {
|
||||
border-top: 5px solid transparent;
|
||||
border-bottom: 5px solid transparent;
|
||||
|
||||
@@ -204,6 +204,10 @@ iD.ui.Background = function(context) {
|
||||
function dragOffset() {
|
||||
var origin = [d3.event.clientX, d3.event.clientY];
|
||||
|
||||
context.container()
|
||||
.append('div')
|
||||
.attr('class', 'nudge-surface');
|
||||
|
||||
d3.select(window)
|
||||
.on('mousemove.offset', function() {
|
||||
var latest = [d3.event.clientX, d3.event.clientY];
|
||||
@@ -216,6 +220,9 @@ iD.ui.Background = function(context) {
|
||||
nudge(d);
|
||||
})
|
||||
.on('mouseup.offset', function() {
|
||||
d3.selectAll('.nudge-surface')
|
||||
.remove();
|
||||
|
||||
d3.select(window)
|
||||
.on('mousemove.offset', null)
|
||||
.on('mouseup.offset', null);
|
||||
|
||||
Reference in New Issue
Block a user