WebCabin / wcDocker

wcDocker (Web Cabin Docker) is a powerful window layout system with a responsive and completely interactive design. Move, remove, create, and duplicate panel windows at any time! Organize how you wish! View the demo here:
http://docker.webcabin.org
146 stars 53 forks source link

Embedded wcDocker instance or otherwise constraining panels to one layout #114

Closed TimNZ closed 7 years ago

TimNZ commented 7 years ago

Hi @Lochemage

I want to create panels that are effectively embedded Docker instances.

This is to allow child panels to be moved around only within that container/parent panel.

What's your recommended approach for this?

At this stage I'm looking at creating a modified version of wcIFrame that wraps around a div instead.
I need to propagate hide/show events from the parent wcDocker down to the child wcDocker at a minimum.

Lochemage commented 7 years ago

@TimNZ

I'm having trouble understanding exactly how you want to use it and why the built in wcIFrame would not work for you as it is. wcIFrame is made to simply be an iFrame inside of your panel layout. With an iFrame, you should be able to create an entirely new docker instance that is contained in this frame.

If I am misunderstanding, please elaborate your use case.

TimNZ commented 7 years ago

It might do. I don't have a lot of experience with <iframe> beyond external src and may have dismissed it incorrectly. Will have a play.

TimNZ commented 7 years ago

Played around a bit and embedded iframe is not workable.

I'm running within Electron so that's a show stopper already as there is a restriction on what can be embedded in iframes, specifically a <webview> which I need.

Running in an iframe also creates a world of pain in sharing JS across parent and iframe. I'm also using React and have to re-engineer (never happen) every component I use.

I think I only have to re-engineer wcDocker as that is where all the event handling code appears to be in my cursory scan. I might have to apply a unique instance id or other way of filtering what body level event handlers apply to.

And possibly create a wcDockerPanel helper class..

This is what I want - no surprises.

google chrome - github com - - screen shot 20-12-2016 12 53 06 pm