Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Elements are misaligned with the scale after scaling of the canvas #41

Open
xiaopujun opened this issue May 4, 2023 · 2 comments
Open
Labels
question Further information is requested

Comments

@xiaopujun
Copy link

Environments

  • Framework name:node16.10、react17
  • Framework version:
  • Component name: React Ruler
  • Component version:
  • Testable Address(optional):

Description

image
image

@xiaopujun
Copy link
Author

The second image is scaled to 200% and the relative position of the elements to the scale is always the same. Is this effect Ruler component achievable?

@daybrush daybrush added the question Further information is requested label May 4, 2023
@daybrush
Copy link
Owner

daybrush commented May 4, 2023

@xiaopujun

ruler has zoom prop (default 1)

Try using the zoom property. (https://github.com/daybrush/ruler#ruler-units)

const [zoom, setZoom] = useState(1);

<Ruler zoom={zoom} />

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants