File tree Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Expand file tree Collapse file tree 4 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ export default class Actor {
138138 this . workers . forEach ( w => {
139139 w . removeEventListener ( 'message' , this . receiveFn , false ) ;
140140 } ) ;
141- this . workerPool . release ( this . actorId ) ;
141+ // this.workerPool.release(this.actorId);
142142 delete this . receiveFn ;
143143 delete this . workers ;
144144 delete this . callbacks ;
Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ export default class WorkerPool {
8686 }
8787
8888 commit ( ) {
89+ if ( ! this . workers ) {
90+ return ;
91+ }
8992 if ( this . _messages . length ) {
9093 for ( let i = 0 ; i < this . _messages . length ; i ++ ) {
9194 if ( ! this . _messages [ i ] || ! this . _messages [ i ] . length ) {
Original file line number Diff line number Diff line change @@ -300,9 +300,11 @@ class GeometryEditor extends Eventable(Class) {
300300 }
301301 } ,
302302 onUp : ( ) => {
303- const geo = shadow || this . _geometry ;
304- this . _update ( 'setCoordinates' , Coordinate . toNumberArrays ( geo . getCoordinates ( ) ) ) ;
305303 if ( shadow ) {
304+ const shadowFirst = shadow . getFirstCoordinate ( ) ;
305+ const first = this . _geometry . getFirstCoordinate ( ) ;
306+ const offset = shadowFirst . sub ( first ) ;
307+ this . _update ( 'translate' , offset ) ;
306308 shadow . remove ( ) ;
307309 }
308310 }
Original file line number Diff line number Diff line change @@ -319,15 +319,10 @@ class GeometryDragHandler extends Handler {
319319 const shadow = this . _shadow ;
320320 if ( shadow ) {
321321 if ( target . options [ 'dragShadow' ] ) {
322- if ( target . getGeometries ) {
323- const shadows = shadow . getGeometries ( ) ;
324- const geos = target . getGeometries ( ) ;
325- shadows . forEach ( ( g , i ) => {
326- geos [ i ] . setCoordinates ( shadows [ i ] . getCoordinates ( ) ) ;
327- } ) ;
328- } else {
329- target . setCoordinates ( shadow . getCoordinates ( ) ) ;
330- }
322+ const shadowFirst = shadow . getFirstCoordinate ( ) ;
323+ const first = target . getFirstCoordinate ( ) ;
324+ const offset = shadowFirst . sub ( first ) ;
325+ target . translate ( offset ) ;
331326 }
332327 shadow . _fireEvent ( 'dragend' , eventParam ) ;
333328 shadow . remove ( ) ;
You can’t perform that action at this time.
0 commit comments