diff --git a/src/js/events/index.js b/src/js/events/index.js index e2476e99..5e7aa213 100644 --- a/src/js/events/index.js +++ b/src/js/events/index.js @@ -90,7 +90,8 @@ class EventsManager { } // touchend, mouseup - onTapEnd() { + onTapEnd(e) { + this.app.ui?.relationCurvature?.onTapEnd(e) this.app.ui?.onTapEnd() } diff --git a/src/js/modules/UI/RelationWidth/index.js b/src/js/modules/UI/RelationWidth/index.js index 73ff0e7f..551a874d 100644 --- a/src/js/modules/UI/RelationWidth/index.js +++ b/src/js/modules/UI/RelationWidth/index.js @@ -10,24 +10,25 @@ class RelationCurvature { const { min, max, value } = this.input this.progressBar = new Progress('relation-width', { min, max, value }) - - this.throttling = false } onInput({ target }) { - if (target != this.input || this.throttling) { + if (target != this.input) { return } + const value = target.value + this.progressBar.update(value) + } - this.throttling = true + onTapEnd({ target }) { + if (target != this.input) { + return + } - requestAnimationFrame(() => { - const value = target.value - this.progressBar.update(value) - handle_curvature_controller(value) - adjustAllLayersSvgDimensions() - this.throttling = false - }) + const value = target.value + this.progressBar.update(value) + handle_curvature_controller(value) + adjustAllLayersSvgDimensions() } }