Added smoothing parameter to DOMScatter

This commit is contained in:
2019-07-11 16:08:49 +02:00
parent cd76ae22a4
commit d04f92ee7f
3 changed files with 21 additions and 6 deletions
+7 -2
View File
@@ -372,6 +372,7 @@ export class AbstractScatter extends Throwable {
if (this.useLowPassFilter) {
rotate = this.rotateLPF.next(rotate)
zoom = this.zoomLPF.next(zoom)
// console.log({rotate, zoom})
}
this.transform(delta, zoom, rotate, delta.about)
if (zoom != 1) this.interactionAnchor = delta.about
@@ -1071,7 +1072,9 @@ export class DOMScatter extends AbstractScatter {
scaleAutoClose = false,
onClose = null,
scaleCloseThreshold = 0.10,
scaleCloseBuffer = 0.05
scaleCloseBuffer = 0.05,
useLowPassFilter = true,
maxRotation = Angle.degree2radian(15)
} = {}
) {
super({
@@ -1095,7 +1098,9 @@ export class DOMScatter extends AbstractScatter {
scaleAutoClose,
scaleCloseThreshold,
scaleCloseBuffer,
onClose
onClose,
useLowPassFilter,
maxRotation
})
if (container == null || width == null || height == null) {
throw new Error('Invalid value: null')