WIP to render vertices while dragging

(re: #3003 / #4602)

For now, drawHover is commented out.  Still not sure what I will do with it.
This means that things flicker a bit when dragging, also connecting nodes
(and closing lines) does not currently work.

There was lot going on preventing the vertices from rendering while dragging.

1. `modeDragNode` needed a proper `selectedIDs()` function that works like other
modes.. Many other places in iD (including the vertex renderer) call `context.selectedIDs()`..
This means that `modeDragNode` needs a new function `restoreSelectedIDs()` to do what
`selectedIDs()` was previously doing (a place to store selectedIDs so that we
can reselect those entities after the user is done dragging a node in select mode)

2. Just so many things in svg/vertices.js
  - siblingAndChildVertices was missing some things for points that we render
    as vertices (points in wireframe, points with directions)
  - the sibling vertices weren't being included in the `filter` function, so
    would disappear when doing differenced/extent redraws
  - probably some other things
This commit is contained in:
Bryan Housel
2017-12-12 17:39:36 -05:00
parent b394cb6dfa
commit 899abc7ef5
6 changed files with 173 additions and 148 deletions
+3 -3
View File
@@ -88,7 +88,7 @@ g.midpoint .shadow {
fill-opacity: 0;
}
g.vertex.vertex-hover {
/*g.vertex.vertex-hover {
display: none;
}
@@ -109,7 +109,7 @@ g.vertex.vertex-hover {
.mode-drag-node .hover-disabled g.vertex.vertex-hover {
display: none;
}
*/
g.vertex.related:not(.selected) .shadow,
g.vertex.hover:not(.selected) .shadow,
g.midpoint.related:not(.selected) .shadow,
@@ -126,7 +126,7 @@ g.vertex.selected .shadow {
.mode-add-area g.midpoint,
.mode-add-line g.midpoint,
.mode-add-point g.midpoint {
display: none;
display: none;
}
/* lines */