Skip to content

Commit 9c90643

Browse files
authored
always fire geometry edit events After processing the internal logic (#2140)
1 parent 6096981 commit 9c90643

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/geometry/editor/GeometryEditor.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ class GeometryEditor extends Eventable(Class) {
343343
function onHandleDragstart(param) {
344344
this._updating = true;
345345
if (opts.onDown) {
346+
opts.onDown.call(me, param['containerPoint'], param);
346347
/**
347348
* change geometry shape start event, fired when drag to change geometry shape.
348349
*
@@ -352,14 +353,14 @@ class GeometryEditor extends Eventable(Class) {
352353
* @property {Geometry} target - the geometry fires the event
353354
*/
354355
this._geometry.fire('handledragstart');
355-
opts.onDown.call(me, param['containerPoint'], param);
356356
}
357357
return false;
358358
}
359359

360360
function onHandleDragging(param) {
361361
me._hideContext();
362362
if (opts.onMove) {
363+
opts.onMove.call(me, param);
363364
/**
364365
* changing geometry shape event, fired when dragging to change geometry shape.
365366
*
@@ -369,13 +370,14 @@ class GeometryEditor extends Eventable(Class) {
369370
* @property {Geometry} target - the geometry fires the event
370371
*/
371372
this._geometry.fire('handledragging');
372-
opts.onMove.call(me, param);
373373
}
374374
return false;
375375
}
376376

377377
function onHandleDragEnd(ev) {
378378
if (opts.onUp) {
379+
//run mouseup code for handle delete etc
380+
opts.onUp.call(me, ev);
379381
/**
380382
* changed geometry shape event, fired when drag end to change geometry shape.
381383
*
@@ -385,7 +387,6 @@ class GeometryEditor extends Eventable(Class) {
385387
* @property {Geometry} target - the geometry fires the event
386388
*/
387389
this._geometry.fire('handledragend');
388-
opts.onUp.call(me, ev);
389390
}
390391
this._updating = false;
391392
return false;

0 commit comments

Comments
 (0)