Skip to main content

how to change the default capture geometry color?

Comments

1 comment

  • Marc Rempel
    There might be a simpler way to do this, but since I had a custom module already going for my site, I was able to subscribe to the GraphicDrawActivatedEvent and then change the line and fill color.  Here is the code that worked for me:

     

                this.app.eventRegistry.event("GraphicDrawActivatedEvent").subscribe(this, (sender) => {

     

                    console.log('graphic drawing event!', sender);

     

                    let lineSymbol = sender.sender.lineSymbol;

     

                    lineSymbol.color.r = 0;

     

                    lineSymbol.color.b = 255;

     

                    lineSymbol.color.g = 255;

     

                    let fillSymbolOutline = sender.sender.fillSymbol.outline;

     

                    fillSymbolOutline.color.r = 0;

     

                    fillSymbolOutline.color.b = 255;

     

                    fillSymbolOutline.color.g = 255;

     

                });
    0

Please sign in to leave a comment.