PDA

View Full Version : useShim:true



schmidetzki
2 Nov 2006, 2:50 PM
This attribute must be used, if the center panel is an iframe.
In my case however, the west panel AND the center panel are iframes. I'm able to move the panel splitter to the right over the center iframe but not to the left over the west iframe.

Do I something wrong?

jack.slocum
2 Nov 2006, 3:02 PM
Are they both useShim?

jarrod
2 Nov 2006, 7:17 PM
I've also noticed that if you have an iframe in the south region of a nestedlayout, the splitter is not draggable into the iframe panel - only happens in Firefox though, works fine in IE.

In general, useShim seems to work reliably only for iframe in the center region.

jack.slocum
2 Nov 2006, 7:22 PM
It's fixed. I just had to bump the z-index of the shim and proxy element. I set them to 11000 and 11001 so they should go over anything. :)

jarrod
2 Nov 2006, 7:38 PM
Yeap, was trying to fix it by bumping up the z-index... it resolves the problem for the main layout's non-center region.

However, it doesn't seem to work for nested layouts.

The shim appears to cover the entire window correctly, but the mousemove event just doesn't seem to fire when the mouse enters the iframe.

jack.slocum
2 Nov 2006, 8:50 PM
Here are the changes I made that seem to work well:

In YAHOO.ext.SplitBar.createProxy:

YAHOO.util.Dom.setStyle(proxy, 'z-index', 11001);

And:


YAHOO.ext.SplitBar.createShim = function(){
var shim = document.createElement('div');
YAHOO.util.Dom.generateId(shim, 'split-shim');
YAHOO.util.Dom.setStyle(shim, 'width', '100%');
YAHOO.util.Dom.setStyle(shim, 'height', '100%');
YAHOO.util.Dom.setStyle(shim, 'position', 'absolute');
YAHOO.util.Dom.setStyle(shim, 'background', 'white');
YAHOO.util.Dom.setStyle(shim, 'z-index', 11000);
shim.innerHTML = '';
window.document.body.appendChild(shim);
var shimEl = YAHOO.ext.Element.get(shim);
shimEl.setOpacity(.01);
shimEl.setXY([0, 0]);
return shimEl;
}

jarrod
2 Nov 2006, 11:40 PM
Cut and pasted the modifications over... no difference - for Firefox, the ddproxy still gets stuck when trying to enter the nested layout's south iframe.

Btw, if I release the mouse button at the point that it gets stuck, I'm then able to move the ddproxy into the iframe - then click on the mouse button again to set the splitter position.

jack.slocum
3 Nov 2006, 1:14 AM
I'll look at it some more. It's hard to debug since I don't have a page setup with an iframe in a nested south panel. :D

This may seem silly, but could you try this?



YAHOO.ext.SplitBar.createShim = function(){
var shim = document.createElement('div');
YAHOO.util.Dom.generateId(shim, 'split-shim');
YAHOO.util.Dom.setStyle(shim, 'width', '100%');
YAHOO.util.Dom.setStyle(shim, 'height', '100%');
YAHOO.util.Dom.setStyle(shim, 'position', 'absolute');
YAHOO.util.Dom.setStyle(shim, 'background', 'white');
YAHOO.util.Dom.setStyle(shim, 'z-index', 11000);
shim.innerHTML = '';
document.body.insertBefore(shim, document.body.firstChild);
var shimEl = YAHOO.ext.Element.get(shim);
shimEl.setOpacity(.01);
shimEl.setXY([0, 0]);
return shimEl;
}

jarrod
3 Nov 2006, 1:32 AM
Just tried it - same results.

Hmm, maybe you can try making a temporary mod to your demo rss feed page, i.e. the nested south panel to be a iframe which pulls down the actual article.

jack.slocum
3 Nov 2006, 1:42 AM
That would be easy. I will try it out when I get up (it's almost 5am and I must sleep).

mxracer
2 Apr 2007, 9:26 PM
That would be easy. I will try it out when I get up (it's almost 5am and I must sleep).

I have the exact same problems as jarrod:

1) if you have an iframe in the south region of a nestedlayout, the splitter is not draggable into the iframe panel - only happens in Firefox though, works fine in IE.

2) if I release the mouse button at the point that it gets stuck, I'm then able to move the ddproxy into the iframe - then click on the mouse button again to set the splitter position.

Was this issue ever resolved?

JeffHowden
2 Apr 2007, 9:39 PM
You should be able to set useShim: true on each of the regions in your BorderLayout that are resizable and have the problem solved. Be sure to include it on the center region as any resizable region's split bar is shared on one side of the center region.

mxracer
3 Apr 2007, 8:36 AM
You should be able to set useShim: true on each of the regions in your BorderLayout that are resizable and have the problem solved. Be sure to include it on the center region as any resizable region's split bar is shared on one side of the center region.

Thanks for your quick response. I am setting useShim: true and it doesn't work in FF 2 (IE 7 works great)

I have set up this test page you can look at: http://www.qwikioffice.com/qwikimail/iframed.php

Notice how in FF that while you can drag and resize the west panel's splitbar over the iframe, you cannot drag and resize the nested north/south splitbar over it.


var layout = new Ext.BorderLayout(document.body, {
north:{
split:false,
titlebar:false
},
west: {
animate: true,
cmargins:{top:0,bottom:0,right:0,left:0},
collapsible:true,
initialSize:200,
minSize:100,
maxSize:400,
split:true,
titlebar:true,
useShim: true
},
center: {
autoScroll: false,
useShim: true
},
south:{
collapsible:false,
initialSize:24,
split:false,
titlebar:false
}
});
layout.beginUpdate();

layout.add('north', new Ext.ContentPanel('header'));
var statusPanel = new Ext.ContentPanel('status');
var south = layout.getRegion('south');
south.add(statusPanel);
layout.add('west', new Ext.ContentPanel('nav', {title: 'Folders', fitToFrame:true, closable:false}));
var innerLayout = new Ext.BorderLayout('content', {
center: {
autoScroll:false,
split:true,
titlebar:true,
useShim: true
},
south: {
animate:true,
autoScroll:false,
cmargins:{top:0,bottom:0,right:0,left:0},
collapsible:true,
initialSize:200,
minSize:100,
maxSize:400,
split:true,
titlebar:true,
useShim: true
}
});

dstod
16 Jul 2007, 4:55 PM
We are having the same problem reported by MXRACER:

1) if you have an iframe in the south region of a nestedlayout, the splitter is not draggable into the iframe panel - only happens in Firefox though, works fine in IE.

2) if I release the mouse button at the point that it gets stuck, I'm then able to move the ddproxy into the iframe - then click on the mouse button again to set the splitter position.

We have tried both the 1.0.1a and 1.1 code bases and the problem is the same in both. We've also tried adjusting the z-index of the splitter to a very high number with no result.

Splitters over iframes work fine everywhere except in the above configuration.

This thread ended in April. Was a fix ever found?