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

Can a panel be marked as "non-floatable"? #91

Closed lomotelsch closed 8 years ago

lomotelsch commented 8 years ago

the headline says it all. Can I either deactivate globally floating or selective per panel?

Lochemage commented 8 years ago

@lomotelsch

Unfortunately, a feature like this does not exist. I did not implement it because it somewhat goes against my original plan for the system. The idea is that it should be mostly up to the user to determine whether they want a panel docked or floating; For the most part, you, as the programmer of these panels, should not really care how a user might want to organize their view. There are exceptions of course, with regard to the 'static' non-moving panels, but I try to keep those at a minimum.

Is there any particular reason why you feel this feature should become necessary?

lomotelsch commented 8 years ago

Hi Jeff,

it´s a requirement for the app we build - that´s why I´m asking. On the other hand it´s forcing a bug wenn you have a floating panel and drag all other panel into this one. On dragging the very last panel into the floating one, wcDocker crashes with this: "WARNING: wcDocker creating placeholder panel when one already exists"

Lochemage commented 8 years ago

@lomotelsch

I'll go ahead and see what I can do about disabling floating panels. It should be relatively easy to add something like a wcPanel.canFloat() method.

Lochemage commented 8 years ago

@lomotelsch

I've added a new method, wcPanel.detachable() (doc here: http://docker.api.webcabin.org/module-wcPanel.html#toc8) that you can use to disable a panels ability to be detached into a floating state.

Let me know if this works for you.

AFamularo-lomoSoft commented 8 years ago

Thank you, this is working fine :-)

lomotelsch commented 8 years ago

perfect, thanks