Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Surveillance camera with direction only visible in wireframe mode #4642

Closed
1ec5 opened this issue Jan 2, 2018 · 4 comments
Closed

Surveillance camera with direction only visible in wireframe mode #4642

1ec5 opened this issue Jan 2, 2018 · 4 comments
Labels
bug A bug - let's fix this! map-renderer An issue with how things are rendered in the map

Comments

@1ec5
Copy link
Collaborator

1ec5 commented Jan 2, 2018

A standalone Surveillance Camera point tagged with camera:direction is completely invisible on the map. Selecting it doesn’t make it visible, although the feature editor does behave normally. Enabling wireframe mode makes the point visible.

Reproduced in be5929d. This regression was likely introduced in #4602.

@1ec5 1ec5 added bug A bug - let's fix this! map-renderer An issue with how things are rendered in the map labels Jan 2, 2018
@bhousel
Copy link
Member

bhousel commented Jan 2, 2018

Thanks for reporting - I'm having trouble reproducing this (have tried Chrome, Safari, and Firefox).
Can you point me at a nodeid that is showing up invisible?

surveillance camera

@bhousel bhousel added the waitfor-info Waiting for more info label Jan 2, 2018
@1ec5
Copy link
Collaborator Author

1ec5 commented Jan 2, 2018

I’m seeing this in both Firefox 56.0b12 and Safari 11 on macOS 10.12.6. Unfortunately, I don’t know of any actual surveillance cameras to save into the live database, but the issue seems to affect any point so tagged; it isn’t specific to a particular existing POI.

hidden-camera

@1ec5
Copy link
Collaborator Author

1ec5 commented Jan 3, 2018

Not sure if it means anything, but when the point icon goes away, the group for the icon also disappears from the layer-points-points group.

@1ec5
Copy link
Collaborator Author

1ec5 commented Jan 3, 2018

Apparently this issue only reproduces at exactly z18, but not at z17.9 or z18.1. A directional node won’t render as a point or vertex at z18:

iD/modules/svg/points.js

Lines 75 to 79 in be5929d

// points with a direction will render as vertices at higher zooms
function renderAsPoint(entity) {
return entity.geometry(graph) === 'point' &&
!(zoom >= 18 && entity.directions(graph, projection).length);
}

iD/modules/svg/vertices.js

Lines 258 to 266 in be5929d

// Points can also render as vertices:
// 1. in wireframe mode or
// 2. at higher zooms if they have a direction
function renderAsVertex(entity, graph, wireframe, zoom) {
var geometry = entity.geometry(graph);
return geometry === 'vertex' || (geometry === 'point' && (
wireframe || (zoom > 18 && entity.directions(graph, projection).length)
));
}

@bhousel bhousel removed the waitfor-info Waiting for more info label Jan 3, 2018
@bhousel bhousel closed this as completed in 99a21d1 Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug - let's fix this! map-renderer An issue with how things are rendered in the map
Projects
None yet
Development

No branches or pull requests

2 participants