Hi, I’m using TrianguloY script fadein found in another post.

Hi, I’m using TrianguloY script fadein found in another post. Works fine but when moving desktop the widget reappear, I don’t know why

Attached code and video

—————-

var e = LL.getEvent();

var d = e.getContainer();

var it=d.getItemById(0x000032);

var time=500;

var FPS=20;

var step=1000/FPS;

delta=255/(time*FPS/1000);

setTimeout(function(){fadein(it,255,time);},step);

//fade in

function fadein(it,alpha,time){

if(alpha<0){

return;

}

alpha-=delta;

it.getProperties().edit().setInteger(“i.alpha”,alpha).commit();

setTimeout(function(){fadein(it,alpha,time);},step);

}

]]>

9 Commentsto Hi, I’m using TrianguloY script fadein found in another post.

  1. Anonymous says:

    < ![CDATA[

    What do you have in the position change event of the desktop?

    ]]>

  2. Anonymous says:

    < ![CDATA[

    Nothing.


    BTW the clock is a zopper widget.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    Could you try with another zooper widget in another desktop to see if it happens the same? (Remember to change the id)

    ]]>

  4. Anonymous says:

    < ![CDATA[

    TrianguloY fails too with a stock widget from zooper and anther desktop.


    I just try changing alpha value but not fading with another script to 100 for example, and this maintain even when moving the desktop.



    I’m going to try with another widget different than Zooper in order to test if this is specific for zooper o for widgets.

    ]]>

  5. Anonymous says:

    < ![CDATA[

    fails too with a 1weather widget in the same way.


    I tried too with a shorcut to an app and the same history, when moving the desktop the app shortcut reappear again.

    ]]>

  6. Anonymous says:

    < ![CDATA[

    I can confirm the bug. However I don’t know why.


    Calling Pierre Hébert​ to check if it is a bug in the launcher or the script have something wrong

    ]]>

  7. Anonymous says:

    < ![CDATA[

    You need to add after “alpha-=delta;”


    if(alpha<0) alpha=0;



    Otherwise you will have a negative alpha value and unexpected results.

    ]]>

  8. Anonymous says:

    < ![CDATA[

    Ah! >_<



    My fault.



    Use this little modified script with Pierre fix



    ———————



    var e = LL.getEvent();


    var d = e.getContainer();



    var it= e.getItem();//change this with the original value





    var time=500;


    var FPS=20;


    var step=1000/FPS;


    delta=255/(time*FPS/1000);



    setTimeout(function(){fadein(it,255,time);},step);




    //fade in


    function fadein(it,alpha,time){




    alpha-=delta;


    if(alpha<0) alpha=0;


    it.getProperties().edit().setInteger(“i.alpha”,alpha).commit();




    if(alpha>0)setTimeout(function(){fadein(it,alpha,time);},step);


    }

    ]]>

  9. Anonymous says:

    < ![CDATA[

    and now is working thanks TrianguloY and Pierre Hébert 

    ]]>

Leave a Reply

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