Commit c9770d51 authored by Alexey.Musinov's avatar Alexey.Musinov

Merge branch 'hotfix/v4.4.2' of https://github.com/ONLYOFFICE/sdkjs into hotfix/v4.4.2

* 'hotfix/v4.4.2' of https://github.com/ONLYOFFICE/sdkjs:
  remove connection on resize
  fix Bug 35300
  fix bug 35300
parents f3e17c18 67a8413e
...@@ -107,14 +107,15 @@ StartAddNewShape.prototype = ...@@ -107,14 +107,15 @@ StartAddNewShape.prototype =
if(oResult){ if(oResult){
var oObject = AscCommon.g_oTableId.Get_ById(oResult.objectId); var oObject = AscCommon.g_oTableId.Get_ById(oResult.objectId);
if(oObject.getObjectType() === AscDFH.historyitem_type_Shape){ this.drawingObjects.connector = oObject;
this.drawingObjects.connector = oObject;
}
} }
if(this.drawingObjects.connector !== this.oldConnector){ if(this.drawingObjects.connector !== this.oldConnector){
this.oldConnector = this.drawingObjects.connector;
this.drawingObjects.updateOverlay(); this.drawingObjects.updateOverlay();
} }
this.oldConnector = this.drawingObjects.connector; else{
this.oldConnector = this.drawingObjects.connector;
}
} }
} }
}, },
......
...@@ -142,7 +142,8 @@ function NewShapeTrack(presetGeom, startX, startY, theme, master, layout, slide, ...@@ -142,7 +142,8 @@ function NewShapeTrack(presetGeom, startX, startY, theme, master, layout, slide,
this.bConnector = AscFormat.isConnectorPreset(presetGeom); this.bConnector = AscFormat.isConnectorPreset(presetGeom);
if(this.bConnector){ if(this.bConnector){
var aSpTree = this.drawingsController.getAllShapes(this.drawingsController.getDrawingArray()); var aSpTree = [];
this.drawingsController.getAllSingularDrawings(this.drawingsController.getDrawingArray(), aSpTree);
var oConnector = null; var oConnector = null;
for(var i = aSpTree.length - 1; i > -1; --i){ for(var i = aSpTree.length - 1; i > -1; --i){
oConnector = aSpTree[i].findConnector(startX, startY); oConnector = aSpTree[i].findConnector(startX, startY);
......
...@@ -823,6 +823,17 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController ...@@ -823,6 +823,17 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
this.overlayObject.updateExtents(this.resizedExtX, this.resizedExtY); this.overlayObject.updateExtents(this.resizedExtX, this.resizedExtY);
this.recalculateTransform(); this.recalculateTransform();
if(this.bConnector){
if(this.numberHandle === 0){
this.beginShapeIdx = null;
this.beginShapeId = null;
}
else{
this.endShapeIdx = null;
this.endShapeId = null;
}
}
}; };
this.resizeRelativeCenter = function(kd1, kd2, ShiftKey) this.resizeRelativeCenter = function(kd1, kd2, ShiftKey)
...@@ -1054,6 +1065,20 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController ...@@ -1054,6 +1065,20 @@ function ResizeTrackShapeImage(originalObject, cardDirection, drawingsController
} }
} }
if(this.bConnector){
var nvUniSpPr = this.originalObject.nvSpPr.nvUniSpPr.copy();
if(this.numberHandle === 0){
nvUniSpPr.stCnxIdx = this.beginShapeIdx;
nvUniSpPr.stCnxId = this.beginShapeId;
this.originalObject.nvSpPr.setUniSpPr(nvUniSpPr);
}
else{
nvUniSpPr.endCnxIdx = this.endShapeIdx;
nvUniSpPr.endCnxId = this.endShapeId;
this.originalObject.nvSpPr.setUniSpPr(nvUniSpPr);
}
}
} }
else{ else{
var _xfrm = this.originalObject.spPr.xfrm; var _xfrm = this.originalObject.spPr.xfrm;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment