-
Notifications
You must be signed in to change notification settings - Fork 60
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
Sketch - Can't (easily) select transparent polygons #752
Comments
I'm not sure how I feel about this. Part of me thinks that clicking on nothing (like the interior of a polygon with no fill) is expected to select nothing. Part of me thinks it is unusual to set a polygon to no-fill by setting the fill opacity to 0 instead of having a separate control for that. |
My main concern is that I think users will want to add sketches without a fill so that you can easily see what's underneath, and will assume that it's a bug that they can no longer click on the interior. |
I fully agree the current behavior isn't optimal and can lead to confusing situations. What I'm unsure about is what the "right"/optimal behavior should be. My concern is if there is a large transparent fill polygon that the user doesn't even realize is there (for an extreme example say a state when zoomed into city level) and it interferes with selecting items they can see, that it is also confusing. I have GeoMoose instances where I have states/counties/various levels of watersheds/etc. loaded as vector layers (with no fill) so the user can select a state/county and use that as a selection filter for another layer (get me all the Wetlands in Lake County type of thing) and it would be really easy for one of those layers to be on and cause an issue. (Or the user could upload a selection area to the scratch layer using GeoJSON/KML, forget about it, and cause the same issue.) |
The I've handled this, historically, is to only allow the minimum transparency to be .01-.05 transparency. It would be a small tweak to the mapbook to do that. Thoughts? |
For people doing the transparent line/poly/point for the label only it might be inconvenient. Or perhaps .01-.05 transparency is not noticeable unless you're looking for it.
…________________________________
From: theduckylittle ***@***.***>
Sent: Friday, January 27, 2023 4:34 AM
To: geomoose/gm3 ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [geomoose/gm3] Sketch - Can't (easily) select transparent polygons (Issue #752)
The I've handled this, historically, is to only allow the minimum transparency to be .01-.05 transparency.
It would be a small tweak to the mapbook to do that. Thoughts?
—
Reply to this email directly, view it on GitHub<#752 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABIE7GQIQQBXSO2HMBARGL3WUO6F5ANCNFSM6AAAAAAR47YACY>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
This issue also occurs if you set the highlight fill for results to be transparent (you then can't do anything that requires clicking on results like measuring or buffering results). I handled that by setting the highlight fill to be 0.00001 transparency (perhaps overkill, but it appears transparent to the user). |
I still think we need to support both behaviors or large polygons can block the selection of smaller features when zoomed in. Just pushing the min-transparency to not-quite zero is going to break other things. I'd really like a good universal answer to this, but I don't have one at the moment. |
I'm not saying we don't support both behaviours. The styles are completely customizable by the user, but I would expect that if I draw something on the map and even if it looks transparent that I can click on it. For out-of-the-box behaviour I feel the .01 opacity is a reasonable compromise. Users could still adjust it if they want true transparency and the vector layers can still be styled however they want (see @chughes-lincoln 's .0000000000000000000000000000000 -breathes- 0000000000001 hack above). |
And this discussion is in the scope of the Sketch layer, none of the others would be directly effected. |
Interesting caveat is that setting a min of .01 opacity changes where the range starts at for adjusting opacity with the slider, which can prevent the user from making things fully opaque. If I have a min-opacity of 0.01, and a step of 0.1, the highest opacity value I can reach in the slider is 0.91, because another step exceeds the max value of 1. I did notice that you can combine the above hack with another hack and set the max-opacity to 1.01, which seems to be correctly treated as 100% opaque. |
What happens if step is set to 0.099? Or to minimize round off issues with repeating "decimals" in binary: |
Or for that matter, let the slider hit 0, but set a minimum in whatever function actually applies the value to the style. |
0.099 also works. |
Returning back to this, for my site I set the min opacity to 0.00001 and the max opacity to 1.00001 which works well. The transparency slider works, and sketches are selectable. Setting min to 0.00001 and max to 1, with a step of 0.099999 would probably give the same result (and may prevent any issues that could arise from setting a max opacity greater than 1 - though I haven't seen any so far). |
When you create a polygon you can adjust the fill opacity to make it fully transparent. If you do this you can't easily go back and select this polygon to edit the geometry or attributes. You actually can select the polygon by clicking on the outline, but it no longer recognizes the interior as part of the polygon, so just clicking in the middle of the shape doesn't select it.
The text was updated successfully, but these errors were encountered: