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

Added an option to allow counter clockwise. #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Added an option to allow counter clockwise. #27

wants to merge 1 commit into from

Conversation

MartinEicher
Copy link

I love you plugin and figured since I had to change it a bit I would share it with you. Thank you for the awesome plugin.

@soundar24
Copy link
Owner

Thanks Martin, thanks for your time to analyze this and your try..

In addition, we need to consider the counter close wise support for "min-range" and "range" slider types also.. I already considered this feature and planned to include in the next release.. I will implement this and deliver soon.. Thanks :)

You can track this here:
#19

@zgmunshi
Copy link

Great Plugin.Thanks for contributing.

in counter clockwise 'setValue' is not working, can you please check

@soundar24
Copy link
Owner

@zgmunshi , In the roundSlider source under the setValue function add the below line to resolve the issue:

value = value * -1;

So, now the function becomes like:

    setValue: function (value, index) {
        value = value * -1;
        if (isNumber(value)) {
            if (isNumber(index)) {
                if (this.options.sliderType == "range") {
                    var i = parseFloat(index), val = parseFloat(value);
                    if (i == 1) value = val + "," + this._handle2.value;
                    else if (i == 2) value = this._handle1.value + "," + val;
                }
                else if (this.options.sliderType == "default") this._active = index;
            }
            this._set("value", value);
        }
    }

@zgmunshi
Copy link

Thanks @soundar24 Its worked.
But with counter clockwise another issue is with step if i set min:1,max:100 and step:1, without counterclock it works properly like it increment as 1,5,9,...

but if counter clock then it increments as 1,4,8,....

Can you help me on this.

@soundar24
Copy link
Owner

@zgmunshi, actually the workaround was not complete, so that you are facing this issue. Once the functionality got implemented in source level then it will be covered all the issues.

I will try to include this functionality in the next release.

Let me know do you have any urgent requirement of this functionality.

@zgmunshi
Copy link

@soundar24 Yes i know its not completely implemented but would really appreciate if you could release the next version with the mentioned functionality as soon as possible as it little urgent.
Thanks.

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

Successfully merging this pull request may close these issues.

None yet

3 participants