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… 

]]>

7 Commentsto changed and implemented

  1. Anonymous says:

    < ![CDATA[

    Copy paste error !


    Changing item attachment mode is not supported at the moment, but it will probably work soon.

    ]]>

  2. Anonymous says:

    < ![CDATA[

    LL.getContainerById seems to fail…

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Could you share the full script please ?

    ]]>

  4. Anonymous says:

    < ![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));

    ]]>

  5. Anonymous says:

    < ![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

    ]]>

  6. Anonymous says:

    < ![CDATA[

    In theory you may have several items opening the same folder for instance, so an indirection is needed

    ]]>

  7. Anonymous says:

    < ![CDATA[

    Got it. It’s working.

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *