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

Rotary control should be shown in counterclockwise #1066

Merged
merged 3 commits into from
Jan 23, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/fontra/client/web-components/ui-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,18 @@ export class Form extends SimpleElement {
onchange: () => {
let value = parseFloat(inputElement.value);
this._fieldChanging(fieldItem.key, value);
rotaryControl.value = value * -1;
rotaryControl.value = -1 * value;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rotaryControl.value = -1 * value;
rotaryControl.value = -value;

},
});
const rotaryControl = html.createDomElement("rotary-control", {
value: fieldItem.value,
value: -1 * fieldItem.value,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
value: -1 * fieldItem.value,
value: -fieldItem.value,

});
{
// Rotary change closure
let valueStream;

rotaryControl.onChangeCallback = (event) => {
const value = -event.value;
const value = -1 * event.value;
justvanrossum marked this conversation as resolved.
Show resolved Hide resolved
inputElement.value = value;
if (event.dragBegin) {
valueStream = new QueueIterator(5, true);
Expand Down