-
Notifications
You must be signed in to change notification settings - Fork 67
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
Right click layerlist layer #211
Conversation
567244b
to
a44b803
Compare
a44b803
to
10df739
Compare
'expand': dc.ops.file['expand'], | ||
'combine': dc.ops.file['combine'], | ||
'rename': dc.ops.file['rename'], | ||
'remove': dc.ops.file['remove'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was written before I saw how #208 rewrote how functions were loaded with the Left Sidebar Menu. This could probably be refactored to more closely match that style for the sake of simplicity. One win that this style has is that it could allow operations to be pulled from different files.
953a20a
to
f182e32
Compare
Wowowow this is great! I'm very much into the idea of splitting menus into their own file, since they are growing larger. This makes a lot more sense (i.e. feels more droppychoppy) as well - the left-hand "geo actions" felt a bit forced, and very unintuitive since it all related to the layers you had selected anyways. 👍 for pushing this 😃 |
@mapsam great, glad you're into it. Feel free to add some styling changes/suggestions to the menu. Got validation on the context-menu operations completed: |
Signed-off-by: Anthony Lukach <[email protected]>
Signed-off-by: Anthony Lukach <[email protected]>
Update on this:
|
This is looking really great. I think the overflow issue can be solved by doing a little bit of math - checking the height of the menu and the window and ensuring it never generates beyond it. I'd be happy to work on this part sometime this week! |
@mapsam feel free to take a crack on keeping the menu on the screen. I admit that I hadn't really thought about just comparing the |
I'll take a look - I'm in my last week out in Richmond for Code for America so might not get to it this week - feel free to try and merge in and I can take a crack in a separate branch! |
Added the portion to calculate the menu location based on the window size. Seems to be working nicely. I'm a big fan of this menu system, it's much improved @alukach! Not sure why my version is missing those style changes, but hopefully it didn't bork anything! |
…op into right-click-layerlist-layer
@alukach whenever you think this is ready to roll, feel free to merge! |
In response to the comments on #205, here's a first-shot at adding right-click menu support for layers on the layerlist.
This entailed a bit of a refactor in the way menus currently worked. Each menu (left sidebar, operations menu, and right-click context-menu) was separated out into separate files and namespaces (
dc.menus.left
,dc.menus.geo
, anddc.menus.layerContextMenu
). A'layerlist:added'
signal was created to return newly added layers.Currently, the right-click context menus only work on a single layer.
There's still work to be done:
'Geo Actions'
).I'm opening this up to get feedback. Is this the right direction for DropChop?