Opened 8 years ago

Closed 7 years ago

#4115 closed defect (worksforme)

Overriding node:selected causes node to be un-selectable

Reported by: ebwolf Owned by: potlatch-dev@…
Priority: major Milestone:
Component: potlatch2 Version:
Keywords: MapCSS node:selected Cc:

Description

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

Change History (1)

comment:1 Changed 7 years ago by Richard

Resolution: worksforme
Status: newclosed

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.

Note: See TracTickets for help on using tickets.