Please help me with a script (for infinity scrolling in panel / dockbar).
Posted by: pierrot | on March 24, 2014
I like the dockbar with infinite scrolling. Unfortunately, this is not in LL.
solution is the panel + script…
My idea:
add to desktop one panel.
for panel set events and action (Load or another automaticaly run script) for Run a script. (for automatically doing script after restart phone for never end).
I know, how find last left and last right item in panel (if user use grid). This two script:
script for find item in last right side
var c = LL.getEvent().getContainer();
var t = c.getBoundingBox();
c.setPosition((t.getRight() – c.getWidth()) – (0*c.getCellWidth()) , (t.getBottom() – c.getHeight()) );
script for find item in last left side
var c = LL.getEvent().getContainer();
var t = c.getBoundingBox();
c.setPosition(t.getLeft() – (0*c.getCellWidth()) , (t.getBottom() – c.getHeight()) );
How has finished script work?
If i have only one screen (in panel), doing nothing.
If i go to more left or right (to another screen in panel) and a i am not on last screen, doing nothing.
If i am on last left screen and doing swipe more left, doing script go to last right side.
If i am on last right screen and doing swipe more right, doing script go to last left side.
Thank you for your help…
]]>Posted in | 8 Comments »
Tags:
< ![CDATA[
you can intercept the position changed event and compare the current position with the bounding box, if X is above or below a threshold you can do the setPosition call.
You may also use two stop points, one on each side of the container, and use their reached event to trigger a move, this may be easier to setup and more efficient
]]>
< ![CDATA[
hehe,
Now i use my two script with to stop points…
But i am not programmer ;-(
I see universal script fore more user than me…
Two day before i writed this text in another place…
I upgrade your script to:
var c = LL.getEvent().getContainer();
var t = c.getBoundingBox();
c.setPosition((t.getRight() – c.getWidth()) – (4*c.getCellWidth()) , t.getBottom() – c.getHeight() );
Because I have behind last icon – stop point (they doing your script to other side – to left).
Now think about how doing this:
When i add next icon (more right), now is my stop point little bit closer. I must removed my stop point also more right.
How automatically by script doing transfer for stop point? (i add icon, now is closer stop point. I use script, and script doing transfer stop point and stop point will be in this place always / but if i add onesmore icon, again automatically doing transfer stop point).
]]>
< ![CDATA[
I think it would be infinite scrolling option, directly in LL (for desktop, panel, folder). (from absolutly last item in left to absolutly last item in right and vice versa / from absolutly last item in top to absolutly last item in bottom and vice versa). User only set if is yes/no for desktop/panel/folder.
]]>
< ![CDATA[
hhhmm, TrianguloY must be off or busy. He made this several weeks ago for infinite scrolling (with zoom effect). I think this is what you need. That is, if ‘paged’ is not a requirement:
var val = 266;
var desk = LL.getEvent().getContainer();
var v = desk.getHeight()/2;
var h = desk.getWidth()/2;
var pos = desk.getPositionX();
var items = desk.getItems();
var n = items.getLength();
for(var i=0;i
var p = Math.floor(pos/val -n/2 +1);
var arg = (p+i)%n;
while(arg<0)arg+=n;
var size = pos-(p+i)*val ;
if(size<0){size= -size;}
size=3- ( size /h*4 );
if(size<0.1){
size =0.1;
items.getAt( arg ).setPosition( h+(p+i)*val ,v);
}
items.getAt(arg).setScale(size,size );
}
]]>
< ![CDATA[
Busy.
I saw your post, and I’m thinking how to make it, but I don’t have much free time now.
However I saw the post I mentioned, made by Michael Plotke in the alpha community is exactly what you need…however I’ll try to fix it (because of the API changes) I’ll try to make it as soon as possible, but I can’t promise.
]]>
< ![CDATA[
I’m not hurry to script. In fact, I believe it is only a principle, we can say that LL has common dockbar (by panel) with infinite scrolling…
]]>
< ![CDATA[
Danbar Danbar check my latest post.
]]>
< ![CDATA[
ok, i will try…
]]>