Added limit to scatter rotation to avoid flicker.

This commit is contained in:
2019-07-04 16:08:23 +02:00
parent dda6262601
commit 9b9988569f
5 changed files with 57 additions and 45 deletions
+1 -2
View File
@@ -269,7 +269,7 @@ export class AbstractScatter extends Throwable {
scaleAutoClose = false,
scaleCloseThreshold = 0.10,
scaleCloseBuffer = 0.05,
maxRotation = 5
maxRotation = Angle.degree2radian(5)
} = {}) {
if (rotationDegrees != null && rotation != null) {
throw new Error('Use rotationDegrees or rotation but not both')
@@ -348,7 +348,6 @@ export class AbstractScatter extends Throwable {
gesture(interaction) {
let delta = interaction.delta()
console.log("gesture", delta.rotate)
if (delta != null) {
this.addVelocity(delta)
let alpha = delta.rotate