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

Cant update delay or transitions #5

Closed
NMathar opened this issue Aug 13, 2018 · 10 comments
Closed

Cant update delay or transitions #5

NMathar opened this issue Aug 13, 2018 · 10 comments
Assignees
Labels
enhancement New feature or request

Comments

@NMathar
Copy link

NMathar commented Aug 13, 2018

Hi,

very good vue component that saved me a lot of time but now i have some little problems.

I update the delay or transition of the fluxOptions Object or the fluxTransitions Object but the changes would not be recognized by the vue-flux component.

For example i add a button that changes the delay from 5000 to 10000 but the delay didnt changed.

Regards, NMonst4

@ragnarlotus ragnarlotus self-assigned this Aug 13, 2018
@ragnarlotus
Copy link
Owner

Glad that saved time to somebody.

About your issue its caused because it was not developed with the idea of changing options on the fly. The vue-flux component copies your options values to internal object with default options, that is why is not "reactive".

I'll create a method allowing you to change options, in the meantime use this:

$refs.slider.config.delay = 2000

I think it will do the trick meanwhile.

Thanks for the idea.

@NMathar
Copy link
Author

NMathar commented Aug 13, 2018

close :D my last try was

this.$refs.slider.options.delay

But YES this works well. Ok now only the last thing i need is the change of transition by a button i think you have done that in your example right?

@ragnarlotus
Copy link
Owner

About transitions you will not be able to do the same, because it reads the names of transitions when the slider is created.

In case you just want to trigger a transition you can do it like in the example with:

$refs.slider.showImage('next', 'transitionBars3d')

I'll add the method to update transitions 👍

@NMathar
Copy link
Author

NMathar commented Aug 13, 2018

Sounds great . Thank you

Sent with GitHawk

@ragnarlotus ragnarlotus added enhancement New feature or request 2.1.0 labels Aug 14, 2018
@ragnarlotus ragnarlotus added 3.0.0 and removed 2.1.0 labels Aug 27, 2018
@ragnarlotus
Copy link
Owner

If I don't do any more updates this week I will release the version 3.0.0 with the new methods at the end of the week :)

@NMathar
Copy link
Author

NMathar commented Sep 3, 2018

Hi Deulos,

i think you added the methods setOptions and setTransitions for this purpose right?

If i set the new delay options like this

                this.$refs.slider.setOptions({
                    delay: 100
                });

i get massive errors from your component.

Is this the right way to update the options now or i am doing it false?

Error
`
[Vue warn]: Error in render: "RangeError: Invalid array length"

found in

---> at FluxGrid.vue
at blinds2d.vue
at VueFlux.vue
`

Regards Nico

@ragnarlotus
Copy link
Owner

Yes, shouldnt give you an error, I will check it and fix it today :).

Sorry for the inconvenience.

@ragnarlotus
Copy link
Owner

I found the problem, 2 lines were out of place... I will release the npm package this afternoon

@ragnarlotus
Copy link
Owner

It is released.

Regards!

@NMathar
Copy link
Author

NMathar commented Sep 4, 2018

Thank you <3 it works like a charm. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants