View Full Version : Shadow size configuration

27 Aug 2010, 9:28 AM
I have changed the size of the shadow that appears behind a window. The default shadow is 6px and my new shadow is 28px. I have updated the shadow images and changed the dimensions in all the appropriate places in the CSS. However, the width/height of the 'x-shadow' container gets set in the javascript somewhere (it is set inline on the x-shadow div) and it uses the old size of the shadow for the calculation.

(I can go into firebug and change the inline width/height values to the appropriate values for my new shadow size and it appears correctly as soon as I change those values.)

Can someone tell me where I can change that value (from 6 to 28) so that the width/height gets calculated correctly?

I thought I found the spot in 'Shadow.js' where it gets calculated ('sw-12' in the code below), but changing that didn't seem to fix it. I was hoping this would just be a public property I could set. Please help...

realign : function(l, t, w, h){
var a = this.adjusts, d = this.el.dom, s = d.style;
var iea = 0;
s.left = (l+a.l)+"px";
s.top = (t+a.t)+"px";
var sw = (w+a.w), sh = (h+a.h), sws = sw +"px", shs = sh + "px";
if(s.width != sws || s.height != shs){
s.width = sws;
s.height = shs;
var cn = d.childNodes;
var sww = Math.max(0, (sw-12))+"px";
cn[0].childNodes[1].style.width = sww;
cn[1].childNodes[1].style.width = sww;
cn[2].childNodes[1].style.width = sww;
cn[1].style.height = Math.max(0, (sh-12))+"px";

27 Aug 2010, 2:17 PM
I'm not sure, but do you know that Shadow.js is only on src folder, is never load on you web page !
if you want to make modification, edit ext-all-debug.js and verify on your html page that you include ext-all-debug.js intead of ext-all.js
But good practice, is to extend object (http://www.sencha.com/learn/Tutorial:Extending_Ext_Class)