User Tools

Site Tools


script_sidebar_anim

**This is an old revision of the document!** ----

A PCRE internal error occured. This might be caused by a faulty plugin

====== About the script ====== * Purpose : Animate panels to look like the Reddit app menu animation * Author : TBog * Link: http://www.google.com/+BogdanTautuTBog ====== How to use the script ====== This is how the panels should look (vertical position and height are not important). [[https://lh5.googleusercontent.com/-vouYHHAtZhs/UzwNHyUvpHI/AAAAAAAARSk/2MWUSg_ANOA/w1078-h854-no/2014-04-02+15.32.00.png|Screen]] ====== Script code ====== <code> var c = LL.getCurrentDesktop(); var cell = c.getCellWidth(); /* left panel */ var pLeft = c.getItemById(0x40005); /* right panel */ var pRight = c.getItemById(0x40004); /* i assume that one cell of the main desktop page will still be visible after stop point reached */ var w = c.getWidth(); var ww = w-cell; var x = c.getPositionX()/ww; if (x <= 0) pLeft.setPosition(-ww/2 + x*ww/2, pLeft.getPositionY()); if (x >= 0) pRight.setPosition(cell + ww/2 + x*ww/2, pRight.getPositionY()); </code>

script_sidebar_anim.1396444839.txt.gz · Last modified: 2014/04/02 13:20 by tbog