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

safari transform: scale(2) makes the quiz problem #172

Open
davidwang1988 opened this issue Jul 1, 2020 · 2 comments
Open

safari transform: scale(2) makes the quiz problem #172

davidwang1988 opened this issue Jul 1, 2020 · 2 comments

Comments

@davidwang1988
Copy link

davidwang1988 commented Jul 1, 2020

chrome is fine, but safari has problem.
rendering is ok, the svg will be scaled to 2x, but when write the character, the stoke will not be in the right place.
code as below: (safari)
'<div id="character-target-1" style: "transform: scale(2)">'
var char1 = HanziWriter.create('character-target-1', '很', {
width: 100,
height: 100,
padding: 5,
showCharacter: false
});
char1.quiz();

@davidwang1988
Copy link
Author

scale(1) is ok, but <1 or >1 will cause problem

@chanind
Copy link
Owner

chanind commented Jul 2, 2020

Interesting - maybe safari reports an incorrect mouse position when scaling is applied? Need to do more investigation

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

No branches or pull requests

2 participants