ContinuousDraw not working properly

Estou montando a lógica do ContinuousDraw para criar Conectores dinamicamente. Porém, quando tento arrastar o mouse para baixo, o conector trava e criado com tamanho limitado.

Esta é a função que habilito o conector e  o meu snapSettings

private changeModeDesign(modeDesign: 'connector' | 'node'){
    if(this.diagram && this.diagram.value){
      if(modeDesign == 'connector'){
        console.log('modeDesign == "connector"')
          this.diagram.value.clearSelection();
          this.diagram.value.drawingObject = {
            type: 'Orthogonal',  
            style: {
              strokeColor: '#ffffff',  
              strokeWidth: 1  
            },
            sourceDecorator: {
              shape: 'None'  
            },
            targetDecorator: {
              shape: 'None'  
            },
            zIndex: 1
          };
          this.diagram.value.tool = DiagramTools.ContinuousDraw | DiagramTools.ZoomPan | DiagramTools.SingleSelect;
          this.diagram.value.selectedItems.userHandles = [];
          this.diagram.value.dataBind();
        }else{
          console.log('modeDesign "!== "connector"')
          this.diagram.value.tool = DiagramTools.Default;
        }
    }
  }


----------------------------------------------------------------------



    this.snapSettings = {
      // Enables the object to snap with both horizontal and Vertical gridlines AND Display both Horizontal and Vertical gridlines
      constraints: SnapConstraints.All,
      // Defines the horizontalGridlines for SnapSettings
      horizontalGridlines: {
        // Sets the lineIntervals of Gridlines
        lineIntervals: [1.25, 14, 0.25, 15, 0.25, 15, 0.25, 15, 0.25, 15],
        // Sets the line color of gridlines
        lineColor: '#2B2D2D',
        // Defines the lineDashArray of gridlines
        lineDashArray: '10 5'
      },
      // Defines the verticalGridlines for SnapSettings
      verticalGridlines: {
        lineColor: '#2B2D2D',
        lineDashArray: '2 2'
      }
    };


1 Reply

MG Moulidharan Gopalakrishnan Syncfusion Team September 30, 2024 08:37 AM UTC

Hi,

We have checked on our end and were unable to replicate the issue. Please refer to the attached video for reference. Additionally, ensure that the diagram-related theme files are correctly referenced in your application. Please review the documentation, and if you continue to face issues, kindly modify the provided sample with the steps to reproduce the issue

Documentation: Getting started with Angular Diagram component | Syncfusion
Sample: https://stackblitz.com/edit/angular-3xdsns-rxjkod?file=src%2Fapp.component.ts


Regards,

Moulidharan G


Attachment: ConnectorDrawingObject_8949869d.zip

Loader.
Up arrow icon