Can I by script close a folder without triggering the animation?

Can I by script close a folder without triggering the animation?

2 Commentsto Can I by script close a folder without triggering the animation?

  1. Mirko Kohler says:

    Yes you can. Get the item of the folder and edit it’s properties.

    Example: script for tapping on item in folder:

    //get the folder item of the calling item

    var folder = LL.getEvent().getItem().getParent().getOpener();

    var fproperties = folder.getProperties();

    //save actual values

    var closeval = fproperties.getString(‘f.animationOut’);

    var fadeval = fproperties.getBoolean(‘f.animFade’);

    //set new value

    fproperties.edit().setString(‘f.animationOut’,’NONE’).setBoolean(‘f.animFade’,false).commit();

    //close folder

    folder.close();

    //restore previous values

    fproperties.edit().setString(‘f.animationOut’,closeprop).setBoolean(‘f.animFade’,fadeval).commit();

  2. Ludvig Berg says:

    Mirko Kohler

    Ah, the properties.

    Awesome, thanks for that. 🙂

Leave a Reply

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