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

Edit Animations time #240

Closed
gregroberts opened this issue Apr 3, 2014 · 4 comments
Closed

Edit Animations time #240

gregroberts opened this issue Apr 3, 2014 · 4 comments

Comments

@gregroberts
Copy link

I'm trying to add functionality to my app which allows users to control how frequently the graph is rendered (with a view to getting the app to work on slow machines). I'm using a jquery-ui slider to control the animationsTime setting in ms, but when the value is changed, nothing changes in the graph. Here's the code of the slider:

    $('#graph-rendertime').slider({
        min:100,
        max:1000,
        values: [500],
        slide: function(event, ui) {
            //change the animations time
            s.settings({
                animationsTime: ui.values[0]
            });
            //output this value to the config box
            $('#rendertime').html(ui.values[0]);
            //refresh the graph
            s.refresh();
        }
    });

Have I got the wrong end of the stick regarding what this parameter controls? Am I implementing it the wrong way, or what?

@jacomyal
Copy link
Owner

jacomyal commented Apr 3, 2014

Actually, the animationsTime parameter is only used as the default value for the sigma.plugins.animate plugin.

I am not sure to understand what you want this parameter to change, could you be a bit more precise?

@gregroberts
Copy link
Author

My intention is to change the how often the forceatlas2 layout re-renders.

It's possible this is a silly question, but it would be nice to know, anyway.

@jacomyal
Copy link
Owner

jacomyal commented Apr 4, 2014

OK, I see what you want. Currently, when FA2 is running, each time it finishes to compute a new state for the graph, it triggers the rendering process.

To modify that, you would have to modify how it interacts with conrad.js to trigger the rendering only once every N steps, or something similar. That would actually be a useful setting to customize how FA2 works.

I keep this in mind to change it as soon as I can.

@gregroberts
Copy link
Author

Awesome, thanks for the explanation

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