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

Conversation

fatih-erikli
Copy link
Collaborator

Fixes #1065.

@fatih-erikli fatih-erikli marked this pull request as draft January 23, 2024 11:49
@fatih-erikli fatih-erikli marked this pull request as ready for review January 23, 2024 11:58
Copy link
Collaborator

@justvanrossum justvanrossum left a comment

Choose a reason for hiding this comment

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

LGTM, except I'd syntactically prefer to just use - instead of multiplying by -1. This should not be a functional change.

@@ -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,

src/fontra/client/web-components/ui-form.js Outdated Show resolved Hide resolved
@justvanrossum justvanrossum merged commit ff7cceb into main Jan 23, 2024
3 checks passed
@justvanrossum justvanrossum deleted the issue-1065 branch January 23, 2024 16:29
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.

[selection info] Transform rotation rotary control initially shows wrong direction
2 participants