June 16, 2009, 11:18 AM
SethWPreferences subwindow location
I have created several gadgets using Analysis Designer. I love this ability to create customized gadgets.
However, some of the gadgets that I have created are very wide. If you click on the preferences button (,which is the check mark on top right of the gadget,) the preferences subwindow will appear off screen since it is left justified.
As a result you have to scroll back over to the left to see the preferences box.
Is there anyway to right justify the preferences box in Analysis Designer gadgets?
Thanks in advance.
-Seth
June 16, 2009, 11:28 AM
Bob Jude FerranteBy the default the preferences panel appears to the right, as long as there's room for it.
The logic checks the size of the gadget and if there isn't room there, it instead positions itself as follows:
If the gadget doesn't leave enough room at the right, it's positioned to the left.
If there isn't room to the right or the left, it positions itself over the top at the left corner.
You can also move the panel by clicking and dragging it in the light blue section at the top.
Hope this helps.
June 16, 2009, 12:12 PM
SethWThanks Bob,
Is there a way to hack the code so the preferences panel always appears on the top right?
-Seth
June 16, 2009, 12:22 PM
Bob Jude FerranteThe code is in gadget_page_shell_form.htm. Around Line 1117 (depending on your release).
//set correct position of preferences form - to the right or the left of the block.
var dpfstyobj = document.getElementById('div_preferences_form').style;
var gadg_l = parseInt(gadg_iframe.style.left);
var gadg_w = parseInt(gadg_iframe.style.width);
var pref_w = parseInt(dpfstyobj.width);
var twidth = gadg_l + gadg_w + pref_w;
//alert ("gadg_l:" + gadg_l + "; gadg_w:" + gadg_w + "; pref_w:" + pref_w + "; total:" + twidth + "; clientWidth:" + document.body.clientWidth);
if (twidth <= document.body.clientWidth)
{
dpfstyobj.left = gadg_l + gadg_w + 3;
}
else
{
if ((gadg_l - pref_w) > 0)
{
dpfstyobj.left = gadg_l - pref_w;
}
else
{
dpfstyobj.left = gadg_l;
}
}