Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to adjust speed of animation in elFinder? #2485

Closed
mauleous opened this issue Apr 20, 2018 · 5 comments
Closed

How to adjust speed of animation in elFinder? #2485

mauleous opened this issue Apr 20, 2018 · 5 comments

Comments

@mauleous
Copy link

Hi there,

Is there a way to customize the speed of animation in elfinder?

For example, when creating a new folder, there is this animation that blink the folder. And also, there is animation when expanding/collapsing a folder (in the folder tree pane on the left).

animation in elfinder

I would like to adjust this animation to play quicker.

Thanks in advance!

@mauleous
Copy link
Author

Ah, for the blinking animation when a new folder is created, I think I found a way to do it:

// First, I created a function based on elFinder's Blink function and then reduce the timing
function blink(elm, mode) {
	var acts = {
		slowonce : function(){elm.hide().delay(150).fadeIn(250).delay(100).fadeOut(500);},
		lookme   : function(){elm.show().fadeOut(100).fadeIn(150);}
	}, func;
	mode = mode || 'slowonce';
		
	func = acts[mode] || acts['lookme'];
		
	elm.stop(true, true);
	func();
}

// and then I override the elFinder's blink function through its instance
elFinderInstance.resources.blink = blink;

I'm not sure if this is the right way to do this. But this works for me. 🙂

However, I still can't find a way to adjust the animation of expanding/collapsing folder tree.
Can anyone help me with this?

@nao-pon
Copy link
Member

nao-pon commented Apr 22, 2018

@mauleous There is no problem in the way you indicated about blink. For the duration of the animation I will allow you to specify it as an option.

@nao-pon
Copy link
Member

nao-pon commented Apr 22, 2018

@mauleous I added an option uiOptions.tree.durations to the client options.

uiOptions : {
    tree : {
        // Durations of each animations
        durations : {
            slideUpDown : 'fast',
            autoScroll : 'fast'
        }
    }
}

@mauleous
Copy link
Author

Awesome~ Thanks Nao-pon! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@nao-pon @mauleous and others