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

Mission Control / alt+tab style functionality ? #192

Open
MadTomT opened this issue Jul 21, 2022 · 7 comments
Open

Mission Control / alt+tab style functionality ? #192

MadTomT opened this issue Jul 21, 2022 · 7 comments
Labels

Comments

@MadTomT
Copy link

MadTomT commented Jul 21, 2022

Hi

I'm looking for a way to show an overview of all active open panels... A bit like Windows Alt + Tab or Mac Mission Control.

This could be done by a button/icon on screen or a key combination.

When the user triggers this the screen darkens and images of the active panels are shown.

Is there anyway to do this with jspanel and if it can be done have the ability to click a panel and have that become the active panel.

Thanks

@Flyer53
Copy link
Owner

Flyer53 commented Jul 23, 2022

@MadTomT
Sorry, something like this is currently not implemented. However, it's a nice idea. The best way to implement such a feature would be an extension I guess. Currently I don't have that much time to work on jsPanel, so don't expect such a feature like this to be available any time soon. But I'll put it on the list of things to remember ...
Regards,
Stefan

@MadTomT
Copy link
Author

MadTomT commented Jul 23, 2022

I've been thinking if it's possible to loop through each panel using htm2canvas to create an image of each, then show those images in a div on a modal.

@Flyer53
Copy link
Owner

Flyer53 commented Jul 25, 2022

Yep ... that would be my approach as well.
html2canvas should be quite easy to use and the jsPanel.modal extension could be used for the modal backdrop I think. Some more work is probably to nicely arrange a bunch of "panel clones" including some interactivity. Maybe youu can try to put something together ... as I said already, I won't have that much time for this in the near future.

@MadTomT
Copy link
Author

MadTomT commented Jul 26, 2022

html2panel doesn't work well with iframes, so I can either get the panel or the content. It won't create an image of both.

Having said that doing a loop around each panel and passing that to html2canvas I've managed to get my panels content to show in a div which looks quite nice. Code is a bit messy so I'll try to get some time to tidy it up and then share it.

@MadTomT
Copy link
Author

MadTomT commented Jul 29, 2022

This doesn't work very well if the iframe loads a page with relative paths. It renders the page with out css, images etc.
Time to think of another approach.

@syonfox
Copy link

syonfox commented Sep 4, 2022

Just my 2 cents why use html2canvas, you have the panels all there. rendered by the beautiful thing called js lol.

psudo code

save panels state(size position minimized etc)

move and resize panels into grid highlighting the selected one.
//consideration: ensure all content is not laggy when resized and responds correctly to resize events

resort all panels and focus selected one.

todo: figure out the event flow maby make a state flow chart.

somthing like

keypress alt -> keypress tab  (showMissionControl)-> keypress tab (nextMissionControle)
  \_____________ \_>keyup alt (finishMissionControle) <_/                /
                  \_________> mouse click (checkMouseMissinonControl) <_/                               

@syonfox
Copy link

syonfox commented Sep 4, 2022

consideration solution/ compromise use some sort of icon with the title text rather then the panel content or moving the panels

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants