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

Collapsable panel does not overlap floating panel #74

Closed arpanmukherjee1 closed 9 years ago

arpanmukherjee1 commented 9 years ago

Screenshot attached.

overlap

I think z-indexs need to be provided at runtime. Also ref issue #39 that needed cycling of z-indexes.

I patched the bug by introducing a function


            _fixZIndex: function () {
                var from = this._floatingList.indexOf(this._focusFrame);
                var to = this._floatingList.length - 1;

                this._floatingList.splice(to, 0, this._floatingList.splice(from, 1)[0]);

                var length = this._floatingList.length;
                var start = 80;
                var panel;
                var step = 2;
                var index = 0;                

                for (var i = start; i <= (start + (length - 1) * step) ; i += step) {

                    index = ((i - start) / step);
                    panel = this._floatingList[index];
                    if (panel) {
                        panel.$frame.css('z-index', i);
                        panel.__trigger(wcDocker.EVENT.Z_INDEX_CHANGED);
                    }
                }
            },

that is called when an panel is added or focused. Z_INDEX_CHANGED event is handled by IFRAME to update it's z-index = z-index of frame + 1.

But it looks like this no more works. Still digging more into this.

Any suggestions on fixing this?

Lochemage commented 9 years ago

@arpanmukherjee1

Thank you for this, I am looking at it now

Lochemage commented 9 years ago

@arpanmukherjee1

I have implemented your change with some slight modification. Please re-open if you find a problem.