Building a custom slider
Hi,
I'm trying to build a horizontal slider that does two things:
- Starts with the slider handle positioned in the center
- Has the slider track to the left of the handle a different color from the slider track to the right of the handle
I've got it close to working properly with one exception. While the slider handle starts out in the center, as I would like (see first image below), and I can slide the handle to the far left without exceeding the boundaries of the slider (see second image below), I can not slide the handle to the far right. It will not go any farther than the initial center position.
I cannot figure out what setting it is that is causing it to stop at center and go no farther to the right. I'm assuming it has to do with the initial positioning and how that affects the scrolling of the dynamic panel, but I don't know how to work around that or why it wouldn't even work as is since it is an element that is bigger than the containing dynamic panel and, therefore, should scroll left or right until reaching the limit of the element being scrolled (i.e. the slider handle and the two track lines).
I have tried to adapt the slider widgets that exist within JIM, but all of them have elements that exist completely within their containing panels. That is, they don't exceed their containing panels' boundaries as mine do and, therefore, don't require a dynamic panel with scrolling.
I have attached a prototype to demonstrate the current implementation of the slider. Any help would be greatly appreciated.
Slider in its initial state
Slider with the handle in the far left position
Check out these tutorials to learn how to create a slider:
1. Designing a slider
2. Designing a price slider
3. Designing a before-after image slider
Check out these tutorials to learn how to create a slider:
1. Designing a slider
2. Designing a price slider
3. Designing a before-after image slider
If this really isn't possible then I'll be fine with just letting it move around but having made it, the (blue and grey) bars that make up the slider come in front of the 'mask' and then permanently stay there.
How it looks when simulation run:
Then when I try to move the button:
I realise that may have made no sense so am I able to send you a .vp file somehow?
Ian
If this really isn't possible then I'll be fine with just letting it move around but having made it, the (blue and grey) bars that make up the slider come in front of the 'mask' and then permanently stay there.
How it looks when simulation run:
Then when I try to move the button:
I realise that may have made no sense so am I able to send you a .vp file somehow?
Ian
Many thanks Victor.
Many thanks Victor.
The sample slider that you have forwarded uses mouse over events. This is not applicable to iOS8. Or am I missing something
The sample slider that you have forwarded uses mouse over events. This is not applicable to iOS8. Or am I missing something
Having similar issues with the rectangle under the button. Once you drag the ball the rectangle comes out in front of everything on the screen. I am using it within a dynamic panel and even when I change panels it remains on the screen while the other content has transitioned out.
Having similar issues with the rectangle under the button. Once you drag the ball the rectangle comes out in front of everything on the screen. I am using it within a dynamic panel and even when I change panels it remains on the screen while the other content has transitioned out.
Hi Rob,
Please check out this new example of a slider. I hope it helps.
https://www.dropbox.com/s/n4njv1l2e7q...
Best,
Sonia Durán
Hi Rob,
Please check out this new example of a slider. I hope it helps.
https://www.dropbox.com/s/n4njv1l2e7q...
Best,
Sonia Durán
Hi Sonia,
I checked this tutorial before, it is about designing a slider. As I mention I'm using Justinmind integrated sliders and I'm wondering about how to use the Events to display a specific number when I move the ellipse.
Thanks!
Hi Sonia,
I checked this tutorial before, it is about designing a slider. As I mention I'm using Justinmind integrated sliders and I'm wondering about how to use the Events to display a specific number when I move the ellipse.
Thanks!
Hi there,
You can do this by creating a 'on drag stop' event with the outcome 'set value' for a text field, which will display the number.
Then create Create the condition 'When [slider circle] intersects [line]
I have attached a screenshot for clarity.
Note that this will only show certain values that you specify - the slider will not display every possible value. I.e. - when the slider intersects the first line, it will display 25, the second line, 50, and so on. In-between values (26, 27, 28, etc.) would be quite laborious to create as you would need to create events for every little space on the line.
Let me know how this works for you.
Best,
Danielle
Hi there,
You can do this by creating a 'on drag stop' event with the outcome 'set value' for a text field, which will display the number.
Then create Create the condition 'When [slider circle] intersects [line]
I have attached a screenshot for clarity.
Note that this will only show certain values that you specify - the slider will not display every possible value. I.e. - when the slider intersects the first line, it will display 25, the second line, 50, and so on. In-between values (26, 27, 28, etc.) would be quite laborious to create as you would need to create events for every little space on the line.
Let me know how this works for you.
Best,
Danielle
Thanks Danielle this is what I need. However I can't find the "on drag stop" event, but only "on drag end" (I have Justinmind 7.1.0). Are these equivalent events?
My current solution is to add multiple rectangles and assign a set value event to each of these targets. But the result is not very responsive, quit buggy.
Also the "set value" event will occurs only once I drop the slider, but not while I hold the slider on the target (i need to drop it). This makes the use of the slider quite tricky. Anyway I can fix that?
Sorry for asking, I'm just getting started and can't find existing threads on the web.
Thanks!
Thanks Danielle this is what I need. However I can't find the "on drag stop" event, but only "on drag end" (I have Justinmind 7.1.0). Are these equivalent events?
My current solution is to add multiple rectangles and assign a set value event to each of these targets. But the result is not very responsive, quit buggy.
Also the "set value" event will occurs only once I drop the slider, but not while I hold the slider on the target (i need to drop it). This makes the use of the slider quite tricky. Anyway I can fix that?
Sorry for asking, I'm just getting started and can't find existing threads on the web.
Thanks!
Hi there,
Yes, on drag end and on drag stop are the same.
Another solution is to have a two variables that detect when the ellipse intersects the line, then have there be an 'On variable change' event for the numbers, with the result Show.
I have created a new slider that has the numbers appear without ending the drag. You can find that here: https://dl.dropboxusercontent.com/u/4...
Let me know how this works for you.
Best,
Danielle
Hi there,
Yes, on drag end and on drag stop are the same.
Another solution is to have a two variables that detect when the ellipse intersects the line, then have there be an 'On variable change' event for the numbers, with the result Show.
I have created a new slider that has the numbers appear without ending the drag. You can find that here: https://dl.dropboxusercontent.com/u/4...
Let me know how this works for you.
Best,
Danielle
Wow your tool works great!
This is exactly what I needed, and I could just look into it and reproduce the tool in my mockup.
this is definitely the best way to make a slider. I think I didn't understand clearly your first screenshot, I've been a bit slow to start!
Thank you so much for your help, it's brilliant.
Wow your tool works great!
This is exactly what I needed, and I could just look into it and reproduce the tool in my mockup.
this is definitely the best way to make a slider. I think I didn't understand clearly your first screenshot, I've been a bit slow to start!
Thank you so much for your help, it's brilliant.
Hi Jan,
You should do the same when decreasing the values --> Variable -1.
Also, to recognize the direction when dragging you should use the "on drag start" then keep the position into a variable. Then use the "on drag" using the current position minus the last position.
I hope this helps,
Best,
Sonia Durán
Hi Jan,
You should do the same when decreasing the values --> Variable -1.
Also, to recognize the direction when dragging you should use the "on drag start" then keep the position into a variable. Then use the "on drag" using the current position minus the last position.
I hope this helps,
Best,
Sonia Durán
Could i send my file with prototype and you make it ? Its posible ?
Could i send my file with prototype and you make it ? Its posible ?
Hi Jan,
Usually, we do not create prototypes. If you want to share with us the vp file here (via dropbox/wetransfer) and I will have a look to your prototype.
Best,
Sonia Durán
Hi Jan,
Usually, we do not create prototypes. If you want to share with us the vp file here (via dropbox/wetransfer) and I will have a look to your prototype.
Best,
Sonia Durán
Thank you so much.
Thank you so much.
I upload this prototype on dropbox and then i put link there, you could see slider on the bottom on the screen and label with number "24". I need value from slider to label.
https://www.dropbox.com/s/bzgttjniyzr...
I upload this prototype on dropbox and then i put link there, you could see slider on the bottom on the screen and label with number "24". I need value from slider to label.
https://www.dropbox.com/s/bzgttjniyzr...
I shared prototype via dropbox, could you look at on this ?
I shared prototype via dropbox, could you look at on this ?
Hi,
here you are your slider modified. In case you want to modify the first and last value, you can do it at the expressions tab.
https://www.dropbox.com/s/cf5ozo6g7tz...
I hope it helps.
Best,
Sonia Durán
Hi,
here you are your slider modified. In case you want to modify the first and last value, you can do it at the expressions tab.
https://www.dropbox.com/s/cf5ozo6g7tz...
I hope it helps.
Best,
Sonia Durán
Just follow this tutorial, making the slider vertical instead of horizontal.
Just follow this tutorial, making the slider vertical instead of horizontal.
Hi Felipe,
May I ask if you could attach an example of what you're looking for?
Best,
Danielle
Hi Felipe,
May I ask if you could attach an example of what you're looking for?
Best,
Danielle
Hi there,
The following tutorial should help you to get some ideas on how to accomplish that. You should create three custom sliders and then add the desired calculations on the text field.
https://www.justinmind.com/support/how-to-design-an-advanced-price-slider-in-your-interactive-prototypes/
Best,
Sonia Durán
Hi there,
The following tutorial should help you to get some ideas on how to accomplish that. You should create three custom sliders and then add the desired calculations on the text field.
https://www.justinmind.com/support/how-to-design-an-advanced-price-slider-in-your-interactive-prototypes/
Best,
Sonia Durán
Hello.
I believe I've followed the above tutorial to the letter by simply creating a vertical slider shape below my slider image instead of an horizontal one. Somehow this is not working.
Is there a way to just rotate a successful horizontal slider since I can't seem to make this work?
I appreciate your time.
martin
Hello.
I believe I've followed the above tutorial to the letter by simply creating a vertical slider shape below my slider image instead of an horizontal one. Somehow this is not working.
Is there a way to just rotate a successful horizontal slider since I can't seem to make this work?
I appreciate your time.
martin
Dear Oana,
You should substitute the corresponding values at the main expression depending on your needs. See the screenshot attached.
Best,
Sonia Durán
Dear Oana,
You should substitute the corresponding values at the main expression depending on your needs. See the screenshot attached.
Best,
Sonia Durán
Thank you Sonia for your answer.
Thank you Sonia for your answer.
Dear @eggroll,
Creating a slider without events is not a good idea if you want to obtain the described behaviour. The example attached should help. Kindly let me know how it goes.
Best,
Sonia Durán
Dear @eggroll,
Creating a slider without events is not a good idea if you want to obtain the described behaviour. The example attached should help. Kindly let me know how it goes.
Best,
Sonia Durán
Dear Serena,
Can you attach an example of what you're looking for and what this looks like so we can assist you more helpfully?
You can attach it in a .rar format, or upload it to a file sharing service such as Dropbox, and attach the link to it here.
Best,
Sonia Durán
Dear Serena,
Can you attach an example of what you're looking for and what this looks like so we can assist you more helpfully?
You can attach it in a .rar format, or upload it to a file sharing service such as Dropbox, and attach the link to it here.
Best,
Sonia Durán
https://www.justinmind.com/support/how-to-create-a-price-slider-with-interactive-elements-in-your-web-wireframes/
https://www.justinmind.com/support/how-to-create-a-price-slider-with-interactive-elements-in-your-web-wireframes/
Dear Francesca,
You should follow the following steps (See the example attached)
First, divide the slider space into as many slots as you need (see the expression in thumb OnDrag event)
Then, map these slots to the required values with a data master (see the expression at the label of the "On Variable Change" event)
Kindly let me know how it goes.
Best,
Dear Francesca,
You should follow the following steps (See the example attached)
First, divide the slider space into as many slots as you need (see the expression in thumb OnDrag event)
Then, map these slots to the required values with a data master (see the expression at the label of the "On Variable Change" event)
Kindly let me know how it goes.
Best,
Sure, check this prototype https://www.dropbox.com/s/nqwvyhpmqixavoe/slider-snap-100px.vp?dl=0
Sure, check this prototype https://www.dropbox.com/s/nqwvyhpmqixavoe/slider-snap-100px.vp?dl=0
I made a quick prototype to show how to do it https://www.dropbox.com/s/nqwvyhpmqixavoe/slider-snap-100px.vp?dl=0
I made a quick prototype to show how to do it https://www.dropbox.com/s/nqwvyhpmqixavoe/slider-snap-100px.vp?dl=0
Victor, you are awesome sir! Thank you very much for this.
Victor, you are awesome sir! Thank you very much for this.
Hi there,
Check out the attached prototype. Does this accomplish what you're looking for?
Best,
Danielle
Hi there,
Check out the attached prototype. Does this accomplish what you're looking for?
Best,
Danielle
Check out the attached prototype, which modifies yours to achieve what you're looking for. Hope this helps.
Check out the attached prototype, which modifies yours to achieve what you're looking for. Hope this helps.
Hi Helly,
Check out the attached prototype. It uses a variable and a data master to store the date/time values. Let me know if you have any questions.
Best,
Danielle
Hi Helly,
Check out the attached prototype. It uses a variable and a data master to store the date/time values. Let me know if you have any questions.
Best,
Danielle
Hi Matt,
This is a really simple fix - you just need to mark the slide menu as 'always on top' in the properties palette. See the attached edited version of your prototype.
Best,
Danielle
Hi Matt,
This is a really simple fix - you just need to mark the slide menu as 'always on top' in the properties palette. See the attached edited version of your prototype.
Best,
Danielle
Did you checked this tutorial in our learning section? https://www.justinmind.com/support/designing-a-price-slider/
Did you checked this tutorial in our learning section? https://www.justinmind.com/support/designing-a-price-slider/
You can prototype a slider, however you will probably need a developer to help with implementing it into your website.
You can prototype a slider, however you will probably need a developer to help with implementing it into your website.
Check out these tutorials to learn how to create a slider:
1. Designing a slider
2. Designing a price slider
3. Designing a before-after image slider
Check out these tutorials to learn how to create a slider:
1. Designing a slider
2. Designing a price slider
3. Designing a before-after image slider
Danielle, thank you very much. I will look into these links.
Danielle, thank you very much. I will look into these links.
Replies have been locked on this page!