Use touch targets for notes, fix a few bugs with note dragging

(closes #5213)
This commit is contained in:
Bryan Housel
2019-01-04 15:48:39 -05:00
parent 67403a2141
commit cd9203975d
10 changed files with 163 additions and 108 deletions
+5 -4
View File
@@ -31,7 +31,9 @@
/* No interactivity except what we specifically allow */
.layer-osm * {
.data-layer.osm *,
.data-layer.notes *,
.data-layer.keepRight * {
pointer-events: none;
}
@@ -42,6 +44,7 @@
/* `.target` objects are interactive */
/* They can be picked up, clicked, hovered, or things can connect to them */
.note.target,
.node.target,
.turn .target {
pointer-events: fill;
@@ -78,7 +81,7 @@
/* NOTE: when more QA layers are added, replace kr_error with generic QA layer selector */
/* points, notes & QA */
/* points & notes */
/* points, notes, markers */
g.kr_error .stroke,
g.note .stroke {
stroke: #222;
@@ -110,9 +113,7 @@ g.note .shadow {
stroke-opacity: 0;
}
g.kr_error.related:not(.selected) .shadow,
g.kr_error.hover:not(.selected) .shadow,
g.note.related:not(.selected) .shadow,
g.note.hover:not(.selected) .shadow,
g.point.related:not(.selected) .shadow,
g.point.hover:not(.selected) .shadow {
+5
View File
@@ -96,7 +96,12 @@
cursor: url(img/cursor-draw.png) 9 9, crosshair; /* FF */
}
.mode-browse .note,
.mode-browse .kr_error,
.mode-select .note,
.mode-select .kr_error,
.turn rect,
.turn circle {
cursor: pointer;
}
+4 -27
View File
@@ -1,28 +1,5 @@
/* OSM Notes and KeepRight Layers */
.layer-keepRight,
.layer-notes {
pointer-events: none;
}
.layer-keepRight .kr_error,
.layer-notes .note * {
pointer-events: none;
}
.mode-browse .layer-notes .note .note-fill,
.mode-select .layer-notes .note .note-fill,
.mode-select-data .layer-notes .note .note-fill,
.mode-select-note .layer-notes .note .note-fill,
.layer-keepRight .kr_error .kr_error-fill,
.layer-notes .note .note-fill {
pointer-events: visible;
cursor: pointer; /* Opera */
cursor: url(img/cursor-select-point.png), pointer; /* FF */
}
.note-header-icon .note-shadow,
.layer-notes .note .note-shadow {
color: #000;
}
.kr_error-header-icon .kr_error-fill,
.layer-keepRight .kr_error .kr_error-fill {
@@ -32,19 +9,19 @@
.note-header-icon .note-fill,
.layer-notes .note .note-fill {
color: #ff3300;
color: #f30;
stroke: #333;
stroke-width: 40px;
}
.note-header-icon.new .note-fill,
.layer-notes .note.new .note-fill {
color: #ffee00;
color: #fe0;
stroke: #333;
stroke-width: 40px;
}
.note-header-icon.closed .note-fill,
.layer-notes .note.closed .note-fill {
color: #55dd00;
color: #5d0;
stroke: #333;
stroke-width: 40px;
}
@@ -88,7 +65,7 @@
.kr_error_type_110, /* poi without name */
.kr_error_type_150, /* railway crossing without tag */
.kr_error_type_220, /* misspelled tag */
.kr_error_type_380 { /* non-physical sport tag */
.kr_error_type_380 { /* non-physical sport tag */
color: #5d0;
}