Circle radius is fixed on PC-Browser but not with touch devices

瀏覽次數:9 次
跳到第一則未讀訊息

C Ban

未讀,
2022年4月2日 下午5:24:492022/4/2
收件者:JSXGraph
Dear JSXGraph  users,
I've figured out that a circle behaves differently on touch devices.
To simply reproduce the behaviour I set a circle with :

var p1 = board.create("point", [0, 0], {
fixed: true
});
var circle = board.create("circle", [p1, 3]); //radius 3

On PC/Mac the circle is stationary, I have no way to move it or increase its size
On mobile devices, it also appears to be stationary, but if I place two fingers on two different points on the line of the circle, I can increase its size by stretching them.

The JSXGraph doc mentions "the radius can be given as a number (which will create a circle with a fixed radius)" but it seems that touch devices doesn't respect that.

Here a live example to test it on touch devices : https://codesandbox.io/s/jsx-l96j42?file=/src/index.js:134-240

Thanks for your help,
Chris

Alfred Wassermann

未讀,
2022年4月3日 下午3:07:432022/4/3
收件者:JSXGraph
Dear Chris,
indeed, manipulating circles and "free lines" is different for mouse and tocuh devices.
A short workaround would be to set the radius by a constant function instead of a constant number:

var circle = board.create("circle", [p1, ()=>3]); //radius 3

Best wishes,
Alfred



回覆所有人
回覆作者
轉寄
0 則新訊息