Commit 1f69d50e authored by SergeyLuzyanin's avatar SergeyLuzyanin

asc_onSignatureClick

parent a94b12ae
......@@ -689,6 +689,9 @@ function handleInlineHitNoText(drawing, drawingObjects, e, x, y, pageIndex, bInS
else if (drawing.getObjectType() === AscDFH.historyitem_type_OleObject && drawingObjects.handleChartDoubleClick){
drawingObjects.handleOleObjectDoubleClick(drawing.parent, drawing, e, x, y, pageIndex);
}
else if (drawing.signatureLine && drawingObjects.handleSignatureDblClick){
drawingObjects.handleSignatureDblClick(drawing.signatureLine.id);
}
else if (2 == e.ClickCount && drawing.parent instanceof ParaDrawing && drawing.parent.Is_MathEquation())
drawingObjects.handleMathDrawingDoubleClick(drawing.parent, e, x, y, pageIndex);
......
......@@ -488,6 +488,12 @@
return AscDFH.historyitem_type_Cnx;
};
CConnectionShape.prototype.copy = function () {
var copy = new CConnectionShape();
this.fillObject(copy);
return copy;
};
window['AscFormat'] = window['AscFormat'] || {};
window['AscFormat'].fCalculateSpPr = fCalculateSpPr;
window['AscFormat'].fCalculateConnectionInfo = fCalculateConnectionInfo;
......
......@@ -2292,8 +2292,7 @@ CShape.prototype.selectionCheck = function (X, Y, PageAbs, NearPos) {
return false;
};
CShape.prototype.copy = function () {
var copy = new CShape();
CShape.prototype.fillObject = function(copy){
if (this.nvSpPr)
copy.setNvSpPr(this.nvSpPr.createDuplicate());
if (this.spPr) {
......@@ -2323,6 +2322,11 @@ CShape.prototype.copy = function () {
copy.cachedImage = this.getBase64Img();
copy.cachedPixH = this.cachedPixH;
copy.cachedPixW = this.cachedPixW;
};
CShape.prototype.copy = function () {
var copy = new CShape();
this.fillObject(copy);
return copy;
};
......
......@@ -75,11 +75,6 @@ function MoveShapeImageTrack(originalObject)
this.groupInvertMatrix.ty = 0;
}
this.getOriginalBoundsRect = function()
{
return this.originalObject.getRectBounds();
};
this.track = function(dx, dy, pageIndex)
{
var original = this.originalObject;
......@@ -156,8 +151,20 @@ function MoveShapeImageTrack(originalObject)
this.y = 0;
}
}
var _xfrm = this.originalObject.spPr.xfrm;
var _x = _xfrm.offX;
var _y = _xfrm.offY;
this.originalObject.spPr.xfrm.setOffX(this.x/scale_coefficients.cx + ch_off_x);
this.originalObject.spPr.xfrm.setOffY(this.y/scale_coefficients.cy + ch_off_y);
if(this.originalObject.getObjectType() === AscDFH.historyitem_type_Cnx){
if(!AscFormat.fApproxEqual(_x, _xfrm.offX) || !AscFormat.fApproxEqual(_y, _xfrm.offY)){
var nvUniSpPr = this.originalObject.nvSpPr.nvUniSpPr;
if(nvUniSpPr.stCnxId !== null || nvUniSpPr.stCnxIdx !== null || nvUniSpPr.endCnxId !== null || nvUniSpPr.endCnxIdx !== null){
this.originalObject.nvSpPr.setUniSpPr(new AscFormat.CNvUniSpPr());
}
}
}
this.originalObject.checkDrawingBaseCoords();
};
}
......@@ -194,80 +201,6 @@ MoveShapeImageTrack.prototype.getBounds = function()
return boundsChecker.Bounds;
};
function MoveShapeImageTrackInGroup(originalObject)
{
this.originalObject = originalObject;
this.x = null;
this.y = null;
this.transform = new CMatrix();
if(!originalObject.isChart())
{
this.brush = originalObject.brush;
this.pen = originalObject.pen;
}
else
{
var pen_brush = AscFormat.CreatePenBrushForChartTrack();
this.brush = pen_brush.brush;
this.pen = pen_brush.pen;
}
this.overlayObject = new AscFormat.OverlayObject(!(this.originalObject.getObjectType() === AscDFH.historyitem_type_ChartSpace)&& this.originalObject.spPr && this.originalObject.spPr.geometry, this.originalObject.extX, this.originalObject.extY, this.brush, this.pen, this.transform);
this.inv = global_MatrixTransformer.Invert(originalObject.group.transform);
this.inv.tx = 0;
this.inv.ty = 0;
this.draw = function(overlay)
{
if(AscFormat.isRealNumber(this.pageIndex) && overlay.SetCurrentPage)
{
overlay.SetCurrentPage(this.pageIndex);
}
this.overlayObject.draw(overlay);
};
this.track = function(dx, dy)
{
var dx_t = this.inv.TransformPointX(dx, dy);
var dy_t = this.inv.TransformPointY(dx, dy);
this.x = this.originalObject.x + dx_t;
this.y = this.originalObject.y + dy_t;
this.calculateTransform();
};
this.getOriginalBoundsRect = function()
{
return this.originalObject.getRectBounds();
};
this.calculateTransform = function()
{
var t = this.transform;
t.Reset();
global_MatrixTransformer.TranslateAppend(t, -this.originalObject.extX*0.5, -this.originalObject.extY*0.5);
if(this.originalObject.flipH)
{
global_MatrixTransformer.ScaleAppend(t, -1, 1);
}
if(this.originalObject.flipV)
{
global_MatrixTransformer.ScaleAppend(t, 1, -1);
}
global_MatrixTransformer.RotateRadAppend(t, -this.originalObject.rot);
global_MatrixTransformer.TranslateAppend(t, this.x + this.originalObject.extX*0.5, this.y + this.originalObject.extY*0.5);
global_MatrixTransformer.MultiplyAppend(t, this.originalObject.group.getTransformMatrix());
};
this.trackEnd = function()
{
var scale_scale_coefficients = this.originalObject.group.getResultScaleCoefficients();
var xfrm = this.originalObject.group.spPr.xfrm;
AscFormat.CheckSpPrXfrm(this.originalObject);
var shape_xfrm = this.originalObject.spPr.xfrm;
shape_xfrm.setOffX(this.x/scale_scale_coefficients.cx + xfrm.chOffX);
shape_xfrm.setOffY(this.y/scale_scale_coefficients.cy + xfrm.chOffY);
}
}
function MoveGroupTrack(originalObject)
{
this.x = null;
......@@ -291,10 +224,6 @@ function MoveGroupTrack(originalObject)
}
this.getOriginalBoundsRect = function()
{
return this.originalObject.getRectBounds();
};
this.track = function(dx, dy, pageIndex)
{
......@@ -357,8 +286,11 @@ function MoveGroupTrack(originalObject)
}
AscFormat.CheckSpPrXfrm(this.originalObject);
var xfrm = this.originalObject.spPr.xfrm;
xfrm.setOffX(this.x);
xfrm.setOffY(this.y);
if(bWord)
{
if(this.originalObject.selectStartPage !== this.pageIndex)
......@@ -374,10 +306,6 @@ function MoveComment(comment)
this.x = comment.x;
this.y = comment.y;
this.getOriginalBoundsRect = function()
{
};
this.track = function(dx, dy)
{
var original = this.comment;
......
......@@ -1300,6 +1300,10 @@ CGraphicObjects.prototype =
this.document.OnMouseUp(e, x, y, pageIndex);
},
handleSignatureDblClick: function(sGuid){
editor.sendEvent("asc_onSignatureClick", sGuid);
},
handleOleObjectDoubleClick: function(drawing, oleObject, e, x, y, pageIndex)
{
......
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