This is an automated email from the ASF dual-hosted git repository.

plainheart pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/echarts-examples.git


The following commit(s) were added to refs/heads/gh-pages by this push:
     new 88ca0040 fix: update position of the drag handle on dragend (#186)
88ca0040 is described below

commit 88ca004030e999073a15303e5fe32462b8fefae2
Author: Zhongxiang Wang <[email protected]>
AuthorDate: Thu Sep 24 17:32:38 2026 +0800

    fix: update position of the drag handle on dragend (#186)
    
    update position of the drag handle on dragend
---
 public/examples/ts/line-draggable.ts | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/public/examples/ts/line-draggable.ts 
b/public/examples/ts/line-draggable.ts
index 13573b74..12d40784 100644
--- a/public/examples/ts/line-draggable.ts
+++ b/public/examples/ts/line-draggable.ts
@@ -93,9 +93,13 @@ setTimeout(function () {
         },
         invisible: true,
         draggable: true,
-        ondrag: function (dx: number, dy: number) {
+        ondrag: function () {
           onPointDragging(dataIndex, [(this as any).x, (this as any).y]);
         },
+        ondragend: function () {
+          // Axis bounds may change, so move the drag handles to the updated 
points.
+          updatePosition();
+        },
         onmousemove: function () {
           showTooltip(dataIndex);
         },
@@ -148,9 +152,6 @@ function onPointDragging(dataIndex: number, pos: number[]) {
       }
     ]
   });
-
-  // Axis bounds may change, so move the drag handles to the updated points.
-  updatePosition();
 }
 
 export {};


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to