@@ -349,7 +349,7 @@ export class DrawingSeries extends LineSeries {
349
349
this . _handlePointerOut ( ) ;
350
350
} )
351
351
352
- this . _getStockChart ( ) . markDirtyKey ( "drawingSelectionEnabled" ) ;
352
+ this . _getStockChart ( ) . _markDirtyPrivateKey ( "drawingSelectionEnabled" ) ;
353
353
354
354
}
355
355
@@ -507,8 +507,9 @@ export class DrawingSeries extends LineSeries {
507
507
508
508
public enableDrawingSelection ( value : boolean ) {
509
509
this . _erasingEnabled = false ;
510
- this . strokes . template . set ( "forceInactive" , ! value ) ;
511
- this . fills . template . set ( "forceInactive" , ! value ) ;
510
+ this . _root . events . once ( "frameended" , ( ) => {
511
+ this . setInteractive ( value ) ;
512
+ } ) ;
512
513
}
513
514
514
515
protected _showSegmentBullets ( index : number ) {
@@ -769,7 +770,7 @@ export class DrawingSeries extends LineSeries {
769
770
}
770
771
771
772
if ( this . _valuesDirty ) {
772
- if ( ! this . _baseSeriesDirty ) {
773
+ if ( ! this . _baseSeriesDirty ) {
773
774
this . markDirtyDrawings ( ) ;
774
775
}
775
776
}
@@ -787,7 +788,7 @@ export class DrawingSeries extends LineSeries {
787
788
const stockChart = this . _getStockChart ( ) ;
788
789
if ( stockChart ) {
789
790
if ( value ) {
790
- stockChart . _selectionWasOn = stockChart . get ( "drawingSelectionEnabled" , false ) ;
791
+ // stockChart._selectionWasOn = stockChart.get("drawingSelectionEnabled", false);
791
792
stockChart . set ( "drawingSelectionEnabled" , false ) ;
792
793
}
793
794
}
@@ -857,11 +858,11 @@ export class DrawingSeries extends LineSeries {
857
858
protected _dispatchStockEvent ( type : any , drawingId ?: string , index ?: number ) {
858
859
const stockChart = this . _getStockChart ( ) ;
859
860
860
- if ( type == "drawingadded" ) {
861
- if ( stockChart . _selectionWasOn ) {
862
- stockChart . set ( "drawingSelectionEnabled" , true ) ;
863
- }
864
- }
861
+ // if (type == "drawingadded") {
862
+ // if (stockChart._selectionWasOn) {
863
+ // stockChart.set("drawingSelectionEnabled", true);
864
+ // }
865
+ // }
865
866
866
867
if ( stockChart && stockChart . events . isEnabled ( type ) ) {
867
868
stockChart . events . dispatch ( type , { drawingId : drawingId , series : this , target : stockChart , index : index } ) ;
@@ -1059,15 +1060,15 @@ export class DrawingSeries extends LineSeries {
1059
1060
}
1060
1061
1061
1062
public toggleDrawing ( enabled ?: boolean ) {
1062
- if ( this . _getStockChart ( ) . get ( "hideDrawingGrips" ) ) {
1063
+ if ( this . _getStockChart ( ) . get ( "hideDrawingGrips" ) ) {
1063
1064
this . circles . getIndex ( 0 ) ?. markDirty ( ) ;
1064
1065
this . root . events . once ( "frameended" , ( ) => {
1065
1066
this . circles . each ( ( circle ) => {
1066
1067
circle . set ( "forceHidden" , ! enabled ) ;
1067
1068
} )
1068
1069
this . grips . each ( ( grip ) => {
1069
1070
grip . set ( "forceInactive" , ! enabled ) ;
1070
- } )
1071
+ } )
1071
1072
} )
1072
1073
}
1073
1074
}
@@ -1214,7 +1215,7 @@ export class DrawingSeries extends LineSeries {
1214
1215
1215
1216
1216
1217
public _selectDrawing ( index : number , keepSelection ?: boolean , force ?: boolean ) {
1217
- if ( this . _getStockChart ( ) . get ( "drawingSelectionEnabled" ) || force ) {
1218
+ if ( this . _getStockChart ( ) . getPrivate ( "drawingSelectionEnabled" ) || force ) {
1218
1219
1219
1220
this . _isSelecting = true ;
1220
1221
0 commit comments