-
Notifications
You must be signed in to change notification settings - Fork 13
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
structure GUI improvements (beta4.2.7) #214
Comments
Thanks for these. I'll provide some rationale for the decisions I made so far. I'd love to hear what you think with this additional context. 1. Toggling 2. Numeric Mouse Fields 3. Repositioning Thank you again for all your comments and engagement, I really appreciate it. |
Absolutely - these are just suggestions :) My way of thinking about the GUI (no idea if it has an official designation or not) is:
This is only a slight refinement on your approach where you show/open the dropdown directly on mouseover. SO:
# These 3 track resize handle.
# in JS these would be vars
g_h_selected = None # The event.target that I mean to move (not always the same as the clicked on item)
g_h_selected_offset = None # The initial mouse offset so it can appear seamless (list containing x,y)
### start drag event
def start_drag(event):
"""
Used when we do initial mousedown and start to Drag:
- calc offsets for simple math adj of moving element
"""
global g_h_selected, g_h_selected_offset
g_h_selected = event.target
# I use a special function to get the mouse position because here I'm inside an SVG container
g_h_selected_offset = get_mouse_position(event, g_h_selected)
### The event called when actually dragging
def resize_draft(event):
"""
Active mouse motion while dragging
- resize the draft_bg etc
- g_h_selected will be "#handle"
"""
if g_h_selected: # because I have other stuff going on...
x,y = get_mouse_position(event, g_h_selected)
# check and maybe clamp to max,min size (one day maybe)
offset = [x - g_h_selected_offset[0], y - g_h_selected_offset[1]]
# do stuff now I have correct offset calculated so it looks like the item moves from where I clicked it.
### end of drag
# I just set the globals to False You probably only need to worry about the initial mousedown offset and then adding/subtracting that into the drag motion data to make it look like you're dragging it from where it was initially clicked on. BTW: Your "Get started" link at https://docs.adacad.org/ is 404. |
Below are a few UI interaction speedup suggestions:
Toggling fields with only two possibilities:
Facing
says "weft facing" then clicking on the value would have the intent (easily reversible) of toggling the value to "warp facing"Numeric input fields:
Repositioning a widget:
The text was updated successfully, but these errors were encountered: