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

Add zoom in/out limitations #558

Closed
wants to merge 2 commits into from
Closed

Add zoom in/out limitations #558

wants to merge 2 commits into from

Conversation

themoenen
Copy link

Description

Set limitations to how much the user can scroll in or out, plus fix issue #556.

Note: I also updated scss/at-import-partial-extension to scss/load-partial-extension in .stylelintrc.js because this setting is deprecated and the linter was complaining.

Type of changes

  • Bug fix (non-breaking change that fixes an issue)

Checklist

  • I have read CONTRIBUTING and CODE_OF_CONDUCT guides.
  • I have followed the code style of this project.
  • I have run yarn run ci: lint and tests pass locally with my changes.
  • I have added tests that prove my fix/feature works OR The changes do not require updated tests.
  • I have added the necessary documentation OR The changes do not require updated docs.

@@ -7,6 +7,6 @@ module.exports = {
'alpha-value-notation': 'number',
'property-no-vendor-prefix': null,
'declaration-block-no-redundant-longhand-properties': null,
'scss/at-import-partial-extension': 'always',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thank you for your interest in improving Miew!

Unfortunately, it appears that the rule you've suggested is no longer supported in stylelint-config-recommended-scss v14.1.0. We currently use stylelint-config-standard-scss v^13.1.0, which relies on an earlier version of the recommended rules. As a result, we're unable to incorporate this specific rule change at this time.


// avoid zoom getting lost in space
const tooSmall = this.object.scale.x <= 0.0005 && factor < 1;
const tooBig = this.object.scale.x >= 20 && factor > 1;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for your contribution and the idea to limit scaling! We appreciate the effort put into this pull request.

Unfortunately, using fixed constant limits for zooming might not be ideal for all scenarios. For instance, zooming out on elements like 2FBU could become problematic, as shown in the image image). As you can see in the other image image, the proposed code restricts zooming out a bit too much in this case.

Let's continue the discussion on alternative approaches in issue #557? Perhaps we can explore a more dynamic scaling solution that adapts to different elements.

@NataliaDSmirnova
Copy link
Collaborator

Sorry, we are not merging the PR

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.

2 participants