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'
}
};