Comment 9 for bug 927898

Revision history for this message
LucaDC (lucadc) wrote :

@Diederik:
>What happens to the global toggles if one of the granular toggles is changed?
I thought them to be completely independent: the global simply turns all off or enables those that are set. This doesn't prevent you changing the granular ones when the global is off (simply nothing will change until you turn it on).

>Lot's of GUI code will have to be added [...] This is a pain.
That's true, I know...

>We currently have 23 different snap sources, and 38 different snap targets. Should we expose all of them?
Gulp. This means 23*38=874 possible interactions to manage. I think I should have a look into the code to better understand: as a user I can't appreciate these numbers because now you can interact with only a few of them (really few compared to the internal numbers).
Anyway, the granularity approach asks for exposing all of them, but I think that it should be possible to logically merge some of them, to get lower numbers. And grouping them in families should make things even simpler (as now) for users that don't want to dive into internal details.

>We will need to store the snap sources separately from the targets
Sure, but not exactly. We should store for each source which targets it must snap to . It's a matrix, not a vector.
23 sources and 38 targets are a lot, but if we group sources into few groups, we'll end up with 874 boolean values but few buttons and in the dialog only the 38 targets would be needed.
In this scenario, we could have a "nodes" button in the toolbar opening a dialog with a combo box and 38 checkboxes (or less); in the combo we could select cusps, smooths and middles (sources), and this would populate the 38 "targets" checkboxes allowing granular selections; so: 1 button for 3 sources and their 114 combinations with the 38 possible targets.
Another button could be for "bounding boxes", having edges, corners, middle points and centers in the combo (1 button for 4 sources and their 152 combinations). And so on for the others (the next could be "paths" with snap to path, to intersections, tangent, perpendicular, etc...).
Maybe in the dialog there could be a "suspend all" button to temporarily turn off all the 38 targets for that particular source (not the entire group) without losing which is selected and which is not (greying them out?) so a particular source can be quickly turned off and on (just open the dialog, select it in the combo and hit the button).
Of course the dialog would be only one, the same for all sources. What changes for each are the values with which it's populated.
Under preferences, same dialog but the combo would have all 23 sources selectable.
Of course, before even starting an enumeration for sources and another for targets should be added: each interaction must have an (s,t) coordinate.
I can see other difficulties while writing (e.g. how to manage quickly turning on and off a particular target or even introducing target groups in a symmetrical manner under the global snap button), with their possible solutions; but before cracking the head on them we should decide if the approach is worth trying.

>[...]it is getting ridculous to save 61 strings[...]
Yes, and worse they would be much more! Why not saving a single string as binary values (like when you embed a picture)? Is that allowed by SVG? Many bits, few characters.