mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-14 01:33:03 +00:00
Merge branch 'master' of github.com:systemed/iD
This commit is contained in:
@@ -33,6 +33,12 @@ body {
|
||||
min-width: 768px;
|
||||
}
|
||||
|
||||
#content {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.limiter {
|
||||
position: relative;
|
||||
max-width: 1200px;
|
||||
|
||||
@@ -8,6 +8,7 @@ iD.modes.DragNode = function(context) {
|
||||
activeIDs,
|
||||
wasMidpoint,
|
||||
cancelled,
|
||||
selection = [],
|
||||
hover = iD.behavior.Hover(context).altDisables(true);
|
||||
|
||||
function edge(point, size) {
|
||||
@@ -120,7 +121,6 @@ iD.modes.DragNode = function(context) {
|
||||
connectAnnotation(d));
|
||||
|
||||
} else if (d.type === 'node' && d.id !== entity.id) {
|
||||
// `entity` is last so it will survive and it's parent ways can be selected below.
|
||||
context.replace(
|
||||
iD.actions.Connect([d.id, entity.id]),
|
||||
connectAnnotation(d));
|
||||
@@ -136,11 +136,13 @@ iD.modes.DragNode = function(context) {
|
||||
moveAnnotation(entity));
|
||||
}
|
||||
|
||||
var parentWays = _.pluck(context.graph().parentWays(entity), 'id');
|
||||
var reselection = selection.filter(function(id) {
|
||||
return context.graph().hasEntity(id);
|
||||
});
|
||||
|
||||
if (parentWays.length) {
|
||||
if (reselection.length) {
|
||||
context.enter(
|
||||
iD.modes.Select(context, parentWays)
|
||||
iD.modes.Select(context, reselection)
|
||||
.suppressMenu(true));
|
||||
} else {
|
||||
context.enter(iD.modes.Browse(context));
|
||||
@@ -193,6 +195,12 @@ iD.modes.DragNode = function(context) {
|
||||
stopNudge();
|
||||
};
|
||||
|
||||
mode.selection = function(_) {
|
||||
if (!arguments.length) return selection;
|
||||
selection = _;
|
||||
return mode;
|
||||
};
|
||||
|
||||
mode.behavior = behavior;
|
||||
|
||||
return mode;
|
||||
|
||||
@@ -10,7 +10,9 @@ iD.modes.Select = function(context, selection) {
|
||||
iD.behavior.Hover(context),
|
||||
iD.behavior.Select(context),
|
||||
iD.behavior.Lasso(context),
|
||||
iD.modes.DragNode(context).behavior],
|
||||
iD.modes.DragNode(context)
|
||||
.selection(selection)
|
||||
.behavior],
|
||||
inspector,
|
||||
radialMenu,
|
||||
newFeature = false,
|
||||
|
||||
19
js/id/ui.js
19
js/id/ui.js
@@ -18,14 +18,17 @@ iD.ui = function(context) {
|
||||
.attr('class', 'col4')
|
||||
.call(iD.ui.Sidebar(context));
|
||||
|
||||
var m = container.append('div')
|
||||
var content = container.append('div')
|
||||
.attr('id', 'content');
|
||||
|
||||
var bar = content.append('div')
|
||||
.attr('id', 'bar')
|
||||
.attr('class', 'fillD');
|
||||
|
||||
var m = content.append('div')
|
||||
.attr('id', 'map')
|
||||
.call(map);
|
||||
|
||||
var bar = m.append('div')
|
||||
.attr('id', 'bar')
|
||||
.attr('class','fillD');
|
||||
|
||||
var limiter = bar.append('div')
|
||||
.attr('class', 'limiter');
|
||||
|
||||
@@ -45,12 +48,12 @@ iD.ui = function(context) {
|
||||
.attr('class', 'spinner')
|
||||
.call(iD.ui.Spinner(context));
|
||||
|
||||
m.append('div')
|
||||
content.append('div')
|
||||
.attr('class', 'attribution')
|
||||
.attr('tabindex', -1)
|
||||
.call(iD.ui.Attribution(context));
|
||||
|
||||
m.append('div')
|
||||
content.append('div')
|
||||
.style('display', 'none')
|
||||
.attr('class', 'help-wrap fillL col5 content');
|
||||
|
||||
@@ -79,7 +82,7 @@ iD.ui = function(context) {
|
||||
.attr('class', 'map-control geolocate-control')
|
||||
.call(iD.ui.Geolocate(map));
|
||||
|
||||
var about = m.append('div')
|
||||
var about = content.append('div')
|
||||
.attr('class','col12 about-block fillD');
|
||||
|
||||
about.append('div')
|
||||
|
||||
Reference in New Issue
Block a user