@@ -7,7 +7,7 @@ import { PointModel } from '../primitives/point-model';
7
7
import { Node , DiagramShape } from '../objects/node' ;
8
8
import { Connector , BezierSegment , StraightSegment } from '../objects/connector' ;
9
9
import { NodeModel , BasicShapeModel , SwimLaneModel , PathModel } from '../objects/node-model' ;
10
- import { BezierSegmentModel , ConnectorModel , StraightSegmentModel } from '../objects/connector-model' ;
10
+ import { BezierSegmentModel , ConnectorModel , StraightSegmentModel , BezierSettingsModel } from '../objects/connector-model' ;
11
11
import { Point } from '../primitives/point' ;
12
12
import { BpmnSubEvent } from '../objects/node' ;
13
13
import { PointPort } from '../objects/port' ;
@@ -2038,7 +2038,10 @@ export class ZoomPanTool extends ToolBase {
2038
2038
const moveTouch1 : ITouches = args . moveTouches [ 1 ] ;
2039
2039
const scale : number = this . getDistance ( moveTouch0 , moveTouch1 ) / this . getDistance ( startTouch0 , startTouch1 ) ;
2040
2040
const focusPoint : PointModel = args . position ;
2041
- this . commandHandler . zoom ( scale , 0 , 0 , focusPoint ) ;
2041
+ // 927527: Diagram flickers while performing pinch zoom
2042
+ if ( scale !== 1 ) {
2043
+ this . commandHandler . zoom ( scale , 0 , 0 , focusPoint ) ;
2044
+ }
2042
2045
this . updateTouch ( startTouch0 , moveTouch0 ) ;
2043
2046
this . updateTouch ( startTouch1 , moveTouch1 ) ;
2044
2047
}
@@ -2605,12 +2608,20 @@ export class FreeHandTool extends ToolBase {
2605
2608
let prevObj = this . commandHandler . diagram . nameTable [ `${ prevId } ` ] ;
2606
2609
this . commandHandler . diagram . remove ( prevObj ) ;
2607
2610
points = this . pointReduction ( points , tolerance ) ;
2611
+ // 927557: controlPointsVisibility Property values not considered in Freehand drawing
2612
+ let bezierSettings : BezierSettingsModel = { } ;
2613
+ if ( ( this . commandHandler . diagram . drawingObject as ConnectorModel ) . bezierSettings ) {
2614
+ bezierSettings = ( this . commandHandler . diagram . drawingObject as ConnectorModel ) . bezierSettings ;
2615
+ }
2616
+ if ( bezierSettings . allowSegmentsReset === undefined ) {
2617
+ bezierSettings . allowSegmentsReset = false ;
2618
+ }
2608
2619
//EJ2-69816 - Added below code to set the allow segment reset as false to avoid the unwanted segment reset.
2609
2620
const newObj : ConnectorModel = {
2610
2621
id : 'newConnector' + randomId ( ) , type : 'Bezier' ,
2611
2622
sourcePoint : { x : points [ 0 ] . x , y : points [ 0 ] . y } , targetPoint : { x : points [ points . length - 1 ] . x , y : points [ points . length - 1 ] . y } ,
2612
2623
//EJ2-873504[BUG]- Source and target decorator for free hand connector is not rendered.
2613
- segments : [ ] , bezierSettings : { allowSegmentsReset : false }
2624
+ segments : [ ] , bezierSettings : bezierSettings
2614
2625
} ;
2615
2626
this . drawingObject = this . commandHandler . drawObject ( newObj as Connector ) ;
2616
2627
this . drawingObject = this . bezierCurveSmoothness ( points , smoothValue , this . drawingObject , obj ) ;
0 commit comments