From a09aaf43edbc55ca10710802dfdd387e3b876311 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sun, 2 Jun 2019 19:26:40 +0200 Subject: [PATCH] Add onDrag callback to ComponentDrag command --- src/commands/view/ComponentDrag.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/commands/view/ComponentDrag.js b/src/commands/view/ComponentDrag.js index c87215fa9..91341bccf 100644 --- a/src/commands/view/ComponentDrag.js +++ b/src/commands/view/ComponentDrag.js @@ -323,12 +323,14 @@ module.exports = { } }, - onDrag() { + onDrag(...args) { const { guidesTarget, opts } = this; + const { onDrag } = opts; this.updateGuides(guidesTarget); opts.debug && guidesTarget.forEach(item => this.renderGuide(item)); opts.guidesInfo && this.renderGuideInfo(guidesTarget.filter(item => item.active)); + onDrag && onDrag(...args); }, onEnd(...args) {