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 use lori Public API functions within the vue component #3

Open
Jones-S opened this issue Jun 15, 2017 · 4 comments
Open

How to use lori Public API functions within the vue component #3

Jones-S opened this issue Jun 15, 2017 · 4 comments

Comments

@Jones-S
Copy link

Jones-S commented Jun 15, 2017

Hi there. I am currentyl trying out your nice vue slider based on lori.
Lori provides some functions like:
slideTo() returnIndex and so on. (http://meandmax.github.io/lory/ > chapter public API)

How would I use them within my vue template (JSX).
I am using a slider with variable width elements and the active element is ~the third of 5 elements. And somehow my infinite option messes up with that. (my active element after page load is not in view). So I thought I could call an inital slideTo to set it to the wanted position?...

thanks for some help here

@mbarwick83
Copy link

Would also be interested to know....

@Jones-S
Copy link
Author

Jones-S commented Jul 12, 2017

any updates here? This would mean I may have to switch to another slider 😞

@alexmoreno
Copy link

getSliderInstance () {
    return this.$children[0].$children.find(item => item.hasOwnProperty('slider')).slider
},

Heh.

@evandroabukamel
Copy link

I put a ref attribute on the lory.

this.$refs.myLory.slider.returnIndex() then I can access the desired element from the list with this returned index.

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

No branches or pull requests

4 participants