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

Color halftone "float" input can only be integer, should allow values in between 0-1 #1775

Closed
jywarren opened this issue Dec 4, 2020 · 2 comments · Fixed by #1776 or #1777
Closed

Comments

@jywarren
Copy link
Member

jywarren commented Dec 4, 2020

Looks like maybe a small issue, but the slider here should allow float/decimal values.

halftone

It's set up that way in the info.json of that file:

"angle": {
"type": "float",
"desc": "angle of rotation of the halftone patterns in radians",
"default": "0.25",
"min": "0",
"max": "1.57"
},

Looks like it's set up for a step of 1 --

<input class="form-control target" type="range" name="angle" value="1" placeholder="" min="0" max="1.57" step="1">

Hopefully a small fix!

@jywarren
Copy link
Member Author

jywarren commented Dec 4, 2020

Looks like this is possible by setting step which is a quick fix!

if (inputDesc.type.toLowerCase() == 'range') {
html +=
'"min="' +
inputDesc.min +
'"max="' +
inputDesc.max +
'"step="' +
(inputDesc.step ? inputDesc.step : 1) + '">' + '<span>' + paramVal + '</span>';

However we should make step = 0.1 the default for type float, maybe? Where are defaults kept?

@jywarren
Copy link
Member Author

jywarren commented Dec 4, 2020

Doing both solutions!

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