As you can see on video…
Posted by: pierrot | on July 25, 2015
As you can see on video…
I have desktop with 3 page. On home page I have pinned panel (as Dockbar). Panel have 3 page. All apps shortcut in panel is pinned.
Up gesture is set for doing this script:
var item = LL.getCurrentDesktop().getItemById(0x00001a);
if ( item.isVisible() )
item.setVisibility(false);
else
item.setVisibility(true);
My problem…
On desktop/3 page I have on bottom for example some folder. This folder have set z-index to most bottom. And I need, if is panel =visible, don’t show any items behind this panel.
What I must set by bindings, or by script? TrianguloY
]]>
< ![CDATA[
Can’t you just set the visibility of the folder the same way (but the opposite) ?
Also, what about place the folder in another location? Why you want it to go there?
]]>
< ![CDATA[
Also, for this case a binding is a simple and easier approach.
Set the visibility property of the panel to
$a
Set the visibility of the folder to
1-$a
In the swipe up gesture do the set a variable action and change the value of ‘a’ to
1-$a
(You can change $a with whatever name you want to use like $dock for example)
]]>
< ![CDATA[
I will like set other visibility status by bindings for folder.
I’m doing some mistake in condition. How will work correct?
var item = LL.getCurrentDesktop().getItemById(0x00001a);
if(item.isVisible()==true) {return 0;} else {return 1;}
]]>
< ![CDATA[
You can’t do it that way.
You need to choose: bindings or scripts
]]>
< ![CDATA[
This works to me… But…
var dockbar = LL.getCurrentDesktop().getItemById(0x00001a);
var item = LL.getCurrentDesktop().getItemById(0x00001b);
if ( dockbar.isVisible() ){
dockbar.setVisibility(false);
item.setVisibility(true);}
else{
dockbar.setVisibility(true);
item.setVisibility(false);}
I must know Id for all item behind panel and add to script. I will like automatic way.
How doing this? Test where is dockbar panel (row). And every item on same row set different visibility than have panel.
]]>
< ![CDATA[
Well, I can make a script to do that. But I want first to find alternatives.
What about:
Another panel to put the folder and other icons, change it’s visibility so that they ‘swap’ having one set of icons or another.
If you still want to dynamically detect the items at the bottom and change it’s visibility, I’ll try to make a script
]]>
< ![CDATA[
Yesterday I was same idea with second panel for folder. Second idea was used sidebar.
Idea for hiding panel and show items behind panel is still actual. I will like use complete grid for visible screen. If you can, please doing script for me. Thanks
]]>
< ![CDATA[
I like user friendly use. I mean user set only dockbar (row, and position, gesture for hiding) and that’s all. If user change position for panel, user cannot doing nothing more, because this work doing automatically script.
]]>
< ![CDATA[
If is row < column, panel is horizontal, we must control same row, otherwise is panel vertical, we must control column.
]]>
< ![CDATA[
And what about items that are partially hidden by the panel? Do they need to be set invisible or not?
]]>
< ![CDATA[
Items in same row or column hide, if is visible panel, and vice versa.
]]>
< ![CDATA[
Yes, but you are supposing that items are 1×1.
What if an item is 2×1 and only half of it is in the same column/row as panel?
]]>
< ![CDATA[
var dockbar = LL.getItemById(0x00001a);
var barcell=dockbar.getCell();
var items=dockbar.getParent().getItems();
var visible=dockbar.isVisible();
dockbar.setVisibility(!visible);
for(var t=0;t
var item=items.getAt(t);
var cell=item.getCell();
if(cell== null) continue;
if(item==dockbar) continue;
if(
barcell.getTop()< =cell.getTop()
&&
barcell.getLeft()< =cell.getLeft()
&&
barcell.getRight()>=cell.getRight()
&&
barcell.getLeft()>=cell.getLeft()
){
item.setVisibility(visible);
}
}
]]>
< ![CDATA[
Hide
]]>
< ![CDATA[
Or maybe enable set variable for user as option… (hide/show) for items not 1×1.
]]>
< ![CDATA[
Script not working good. Panel is show/hiden, but items behind panel are everytime visible.
]]>
< ![CDATA[
Because those items are not behind the panel. The panel is pinned so that it is shown where it is not.
I’ll try again
]]>
< ![CDATA[
var dockbar = LL.getItemById(0x00001a);
var barcell=dockbar.getCell();
var bb=barcell.getBottom();
var bt=barcell.getTop();
var br=barcell.getRight();
var bl=barcell.getLeft();
var visible=dockbar.isVisible();
var items=dockbar.getParent().getItems();
var horizontally=dockbar.getWidth()>=dockbar.getHeight();
dockbar.setVisibility(!visible);
for(var t=0;t
var item=items.getAt(t);
var cell=item.getCell();
if(cell== null) continue;
if(item==dockbar) continue;
var cb=cell.getBottom();
var ct=cell.getTop();
var cr=cell.getRight();
var cl=cell.getLeft();
if(
(horizontally &&( (ct>=bt && ctbt && cb< =bb) ) )
||
(!horizontally &&( (cl>=bl && cl
bl && cr< =br) ) )
){
item.setVisibility(visible);
}
}
]]>
< ![CDATA[
Previos bug is fixed. But if I change panel position to different row, items from original position doing still hide/show function.
]]>
< ![CDATA[
Danbar Danbar a script can’t detect when an item was moved. The only thing is to set visible all items that are not behind the panel (when you run the script)
In that case just change the last part of the script with this:
…
){
item.setVisibility(visible);
}else{
item.setVisibility(true);
}
}
]]>
< ![CDATA[
Hehe, I doing. But I mean problem is in different place. If I change position to center of screen (I have 5 rows desktop) , now after show panel are hidden items one row up from panel position and one row down…
]]>
< ![CDATA[
Ouch, my bad. I edited the script above
]]>
< ![CDATA[
Thanks, now I mean work.
]]>