File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ export default class DrawPoint2D extends DrawObject {
3636 }
3737
3838 innerOnMouseUp ( event ) {
39+ let that = this ;
3940 const pnt = this . m_coordSys . pointToData ( [ event . pointer . x , event . pointer . y ] ) ;
4041
4142 this . m_symbol . getElement ( ) . then ( ( element ) => {
43+ const { style} = that . m_symbol ;
44+ if ( style && style . nodeStyles ) {
45+ element . initNodeStyles ( style . nodeStyles ) ;
46+ }
4247 const object = PlotObjectFactory . createInstance ( this . m_symbol . type , {
4348 element :element ,
4449 canvas : this . _plotLayer ,
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ export default class DrawPolyline2D extends DrawObject {
5353
5454 innerOnMouseUp ( event ) {
5555 if ( ! this . m_startDrawing ) this . m_startDrawing = true ;
56+ let that = this ;
5657
5758 const pnt = this . m_coordSys . pointToData ( [ event . pointer . x , event . pointer . y ] ) ;
5859 const lastPnt = this . m_coords . length > 2 ? this . m_coords [ this . m_coords . length - 2 ] : null ;
@@ -69,6 +70,10 @@ export default class DrawPolyline2D extends DrawObject {
6970
7071 if ( ! this . m_object ) {
7172 this . m_symbol . getElement ( ) . then ( ( element ) => {
73+ const { style} = that . m_symbol ;
74+ if ( style && style . nodeStyles ) {
75+ element . initNodeStyles ( style . nodeStyles ) ;
76+ }
7277 this . m_object = PlotObjectFactory . createInstance ( this . m_symbol . type , {
7378 element : element ,
7479 canvas : this . _plotLayer
You can’t perform that action at this time.
0 commit comments