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

Cannot select Rapid objects when wireframe is engaged #983

Closed
bradlewt opened this issue Jul 4, 2023 · 3 comments
Closed

Cannot select Rapid objects when wireframe is engaged #983

bradlewt opened this issue Jul 4, 2023 · 3 comments
Labels
bug Something isn't working feature-usability Issue or feature related to usability - something hard to do
Milestone

Comments

@bradlewt
Copy link

bradlewt commented Jul 4, 2023

Description

Normally one can select a Rapid object, like a building, hit A and place it. Currently it is not possible to select the proposed object when wireframe is engaged. It is only possible to select when the building is considered "full". This obscures the imagery it makes it hard to determine if the building is correct, or not.

Version

2.0.3

What browser are you seeing the problem on? What version are you running?

Firefox v114.0

The OS you're using

win

Steps to reproduce

  1. open new rapid instance.
  2. go to an area without buildings
  3. if on full, select proposed building
  4. deselect said building
  5. hit "w" to wireframe the object
  6. try to select
  7. hit "w" again to fill the object and observe it is now, again, select-able.
RapidWireframeselect.mp4

The browser URL at the time you encountered the bug

https://rapideditor.org/edit#background=Mapbox&datasets=msBuildings&disable_features=landuse&map=20.52/39.16531/22.88964

The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0

@tordans
Copy link

tordans commented Jul 24, 2023

Thanks for this issue! I ran into this just now and was about to create an issue with the screencast I prepared. Its good to know how to "fix" the issue right away :-).

@bhousel
Copy link
Contributor

bhousel commented Aug 10, 2023

related #719
tl;dr - how we are drawing polygons isn't ideal. The fill/mask is the interactive part, so when it goes away, no pointer events occur 😆

@bhousel bhousel added bug Something isn't working feature-usability Issue or feature related to usability - something hard to do labels Aug 10, 2023
@Bonkles
Copy link
Contributor

Bonkles commented Aug 10, 2023

Fixed this by mimicking the synthetic 'hit target' code for our ways and using it ONLY during the wifreframe case for polys. i.e. we generate a hit target for the surrounding polygon (not any of the inners) in wireframe mode. The width of the hit target is VERY small, in keeping with the spirit of wireframe mode.

Vid:

wireframe_mode_hit_targets_on_polys.mov

bhousel added a commit that referenced this issue Aug 18, 2023
(re: #983)

We were setting container.hitArea in wireframe mode, but not removing it during other fill modes

I ended up fixing it like this:
- we calculate the bufferdata once , and this is in the same place where we
   calculate the ssr, whenever geometry changes
- this same bufferdata can be used for both the halos and also the container
   hitarea in wireframe mode
- when not in wireframe mode, remove the container hitarea
@Bonkles Bonkles added this to the v2.1 milestone Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feature-usability Issue or feature related to usability - something hard to do
Projects
None yet
Development

No branches or pull requests

4 participants