changed and implemented
changed and implemented
Script API reference:
1. Some values like gridPColumnNum are integers, not strings
2.why is i.onGrid readonly?
Would be nice to be able to change that in scripts…
« TAT-tribute fully scripted. (Previous Post)
(Next Post) Is there a way to turn off scripting temporarily? »
< ![CDATA[
Copy paste error !
Changing item attachment mode is not supported at the moment, but it will probably work soon.
]]>
< ![CDATA[
LL.getContainerById seems to fail…
]]>
< ![CDATA[
Could you share the full script please ?
]]>
< ![CDATA[
var e=LL.getEvent();
var d=LL.getCurrentDesktop();
var c=LL.getContainerById(131073);
var item =c.getItemById(7012353);
var min=0;
var max=0;
var items =d.getItems();
for(i=0;i
{
if(items.getAt(i).getProperties().getBoolean(“i.onGrid”))
{
var cell=items.getAt(i).getCell();
if(cell.getTop()
if(cell.getTop()>max)max=cell.getTop();
}
}
var columns=d.getProperties().getInteger(“gridPColumnNum”);
min=Math.floor(min/columns);
max=Math.floor(max/columns);
var pmax=c.getHeight()-item.getHeight();
var dcount=max-min;
var current=Math.floor(min+(d.getPositionY()/d.getHeight()))
c.setPosition(0,pmax*(current/dcount));
]]>
< ![CDATA[
I understand: 131073 is not a valid container id, I think you are using the item id instead, which is a panel or folder. You need to get this item first and call getContainer() on it
]]>
< ![CDATA[
In theory you may have several items opening the same folder for instance, so an indirection is needed
]]>
< ![CDATA[
Got it. It’s working.
]]>