mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 06:28:15 +02:00
Use touch targets for notes, fix a few bugs with note dragging
(closes #5213)
This commit is contained in:
@@ -160,8 +160,8 @@ export function behaviorDrag() {
|
||||
for (; target && target !== root; target = target.parentNode) {
|
||||
var datum = target.__data__;
|
||||
|
||||
var entity = datum instanceof osmNote ?
|
||||
datum : datum && datum.properties && datum.properties.entity;
|
||||
var entity = datum instanceof osmNote ? datum
|
||||
: datum && datum.properties && datum.properties.entity;
|
||||
|
||||
if (entity && target[matchesSelector](_selector)) {
|
||||
return dragstart.call(target, entity);
|
||||
|
||||
@@ -112,7 +112,11 @@ export function behaviorHover(context) {
|
||||
entity = datum;
|
||||
selector = '.data' + datum.__featurehash__;
|
||||
|
||||
} else if (datum instanceof osmNote || datum instanceof krError) {
|
||||
} else if (datum instanceof krError) {
|
||||
entity = datum;
|
||||
selector = '.error-' + datum.id;
|
||||
|
||||
} else if (datum instanceof osmNote) {
|
||||
entity = datum;
|
||||
selector = '.note-' + datum.id;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user