March, 2014
now browsing by month
API suggestion:
Array LL.getOpenFolders()
So we won’t need to search all the folders in all the desktops and check all the folders to see if it is open or not.
Edit: if possible, the folders in the array could be sorted depending on which is above. (Yes, I’m thinking in closing the top most folder just taking the first element)
]]>Stop points.
Im trying to make a drawer that slides out from the left side of my screen. But not that simple, I want it the same as the one in Gplay G+ etc, were it only slides out if I swipe from the left edge of my screen.To do this I thought I could use stop points to make certain parts of my screen swipable and leave the rest untouched but there so confusing. Is this even possible and can anyone help me set it up. If your confused reading this just load up G+ or GPlay and checkout the drawer in them apps this is exactly what I want cheers lads and lasses.
]]>Fast run
This script is a little tool for those who want to launch short (or long) scripts in an easy way, without need to write a new one, launch it, forget to delete it…
This script will let you write/paste a script and run it directly from the eval javascript feature.
Features:
– Automatically save the last executed script
– Custom predefined vars: e-event, c-container, i-item (of the event)
– custom function: Toast(string)
IMPORTANT!
Since it uses the eval function, you can’t use alert,prompt or confirm. That’s why I made the Toast one. (Timeouts work)
Any suggestion will be greatly appreciated 🙂
————————————-
/*Available vars */
var e = LL.getEvent();
var c = e.getContainer();
var i = e.getItem();
var text = LL.getScriptTag() || “”;
var out = prompt(“Functions: Toast(string);\nVars: e-event, c-container, i-item\n\nPrevious input: \n”+text+”\n_________________________________________________________”,text);
//Change this ‘line’ if you want
if(out!=null) {
LL.setScriptTag(out);
eval(out);
}
/*available functions */
function Toast(say){Android.makeNewToast(say,false).show();}
]]>Horizontal and vertical screen loop with items movement
– allow infinite scroll (decelerate/bounce may also work instead)
– set script in positionchanged event of your desktop. (should work also in other containers)
– i recommend to use snap to pages, it may fail without
– set up your configuration: if you want to disable it for one direction set the value to false
Known bugs:
– Scrolling left very fast with a low amount of pages moves items to false positions (Too far left). fixed
– Scrolling right/bottom fast moves items to false positions (Too far right/bottom). occurence reduced
– using the script in more than one container is buggy fixed
– no check for single pages added
——————————
//config
var horizontalScrolling=true;
var verticalScrolling=true;
//endconfig
var d=LL.getEvent().getContainer();
if(d.getId()==-1)d=LL.getCurrentDesktop();
if(d.getPositionScale()!=1)return;
var data=JSON.parse(d.getTag()||”null”);
if (data==null)
{
data=new Object();
data.stateX=0;
data.stateY=0;
data.running=false;
}
if(data.running==true)return;
data.running=true;
d.setTag(JSON.stringify(data));
var dwidth=d.getWidth();
var dheight=d.getHeight();
var cwidth=d.getCellWidth();
var cheight=d.getCellHeight();
var posX=d.getPositionX();
var posY=d.getPositionY();
var box=d.getBoundingBox();
var minX=box.getLeft();
var maxX=box.getRight();
var minY=box.getTop();
var maxY=box.getBottom();
var fullwidth=maxX-minX;
var fullheight=maxY-minY;
var items=d.getItems();
var setLeft=function()
{
data.stateX=1;
for(x=0;x { var item=items.getAt(x); if(item.getPositionX()>=maxX-dwidth) { if(item.getProperties().getBoolean(“i.onGrid”)) { var cell=item.getCell(); item.setCell(Math.round(cell.getLeft()-fullwidth/cwidth), Math.round(cell.getTop()), Math.round(cell.getRight() -fullwidth/cwidth), Math.round(cell.getBottom())); } else { item.setPosition(item.getPositionX()-fullwidth,item.getPositionY()); } } } } var setRight=function() { data.stateX=0; for(x=0;x { var item=items.getAt(x); if(item.getPositionX() { if(item.getProperties().getBoolean(“i.onGrid”)) { var cell=item.getCell(); item.setCell( Math.round(cell.getLeft()+fullwidth/cwidth), Math.round(cell.getTop()), Math.round(cell.getRight() +fullwidth/cwidth), Math.round(cell.getBottom())); } else { item.setPosition(item.getPositionX()+fullwidth,item.getPositionY()); } } } } var setTop=function() { data.stateY=1; for(x=0;x { var item=items.getAt(x); if(item.getPositionY()>=maxY-dheight) { if(item.getProperties().getBoolean(“i.onGrid”)) { var cell=item.getCell(); item.setCell(Math.round(cell.getLeft()), Math.round(cell.getTop()-fullheight/cheight), Math.round(cell.getRight()), Math.round(cell.getBottom()-fullheight/cheight)); } else { item.setPosition(item.getPositionX(),item.getPositionY()-fullheight); } } } } var setBottom=function() { data.stateY=0; for(x=0;x { var item=items.getAt(x); if(item.getPositionY() { if(item.getProperties().getBoolean(“i.onGrid”)) { var cell=item.getCell(); item.setCell( Math.round(cell.getLeft()), Math.round(cell.getTop()+fullheight/cheight), Math.round(cell.getRight()), Math.round(cell.getBottom()+fullheight/cheight)); } else { item.setPosition(item.getPositionX(),item.getPositionY()+fullheight); } } } } if(fullwidth>dwidth && horizontalScrolling) { if(data.stateX==1) { if(posX<=minX || posX>=minX+dwidth) { if(posX<=minX) d.setPosition(maxX,posY,1,false); setRight(); } } else { if(posX setLeft(); if(posX>maxX-dwidth) { d.setPosition(minX-dwidth,posY,1,false); setLeft(); } } } else { if(posX d.setPosition(minX,posY,1,false); if(posX>maxX-dwidth) d.setPosition(maxX-dwidth,posY,1,false); } posX=d.getPositionX(); if(fullheight>dheight && verticalScrolling) { if(data.stateY==1) { if(posY<=minY || posY>=minY+dheight) { if(posY<=minY) d.setPosition(posX,maxY,1,false); setBottom(); } } else { if(posY setTop(); if(posY>maxY-dheight) { d.setPosition(posX,minY-dheight,1,false); setTop(); } } } else { if(posY d.setPosition(posX,minY,1,false); if(posY>maxY-dheight) d.setPosition(posX,maxY-dheight,1,false); } var done=function() { data.running=false; d.setTag(JSON.stringify(data)); } setTimeout(done,0); Please report all bugs! *And give feedback*
Is there a way to change the color of the text in the widgets selection menu?
This isn’t a super high priority thing, but it would be nice to fix it.
]]>More like an improvement, than a feature.
Would be nice if the background of the icon picker (customize item->select an icon) was more dynamic. I like the black bg, but it’s almost impossible to choose the right icon, if the icon pack consists of black icons (tiny black icons). Only thing that helped me, was that the placing of tiny blue and tiny black icons was the same and then some trial and error.
Perhaps sampling the icons and seeing if they are dark or light and adapt based on that. Or a switch to change to a lighter background (probably a lot easier this way).
]]>