Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Overriding node:selected causes node to be un-selectable #4115

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment
Closed

Overriding node:selected causes node to be un-selectable #4115

openstreetmap-trac opened this issue Jul 23, 2021 · 1 comment

Comments

@openstreetmap-trac
Copy link

Reporter: ebwolf
[Submitted to the original trac issue database at 9.51pm, Monday, 28th November 2011]

I am using Potlatch 2.3 Build 2.3-115-gbbacb39 locally, pointed at the USGS OSM Server (navigator.er.usgs.gov).

In my style .css file, if I have two statements:

node :selected { icon-image: square; icon-width: 30; color: yellow; interactive: no; z-index: 2; }
node[FCode=82024] { icon-image: usgs/library.png; z-index: 1; }

Then when I select a node with tag FCode=82024, then the selection starts to happen and then immediately deselects. If I reverse the two statements, like this:

node[FCode=82024] { icon-image: usgs/library.png; z-index: 1; }
node :selected { icon-image: square; icon-width: 30; color: yellow; interactive: no; z-index: 2; }

Then when I select the node, the node remains selected and I get a yellow square (which is another problem).

Should the MapCSS dictate how feature selection works inside Potlatch?

-Eric

@openstreetmap-trac
Copy link
Author

Author: Richard
[Added to the original trac issue at 10.45pm, Wednesday, 7th March 2012]

I think you're using MapCSS 0.1 syntax there.

In MapCSS 0.2 (as currently implemented in Potlatch), if you want to have two on-screen objects for the same node, you need to create subparts. In other words, you should put the highlight on a different subpart like this - node::selectedNode :selected { ... }.

This is how the osm.org Potlatch instance does it - look at core_interactive.css, and indeed the MapCSS 0.2 spec.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant