Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sdkjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
sdkjs
Commits
cba9dab5
Commit
cba9dab5
authored
May 25, 2017
by
SergeyLuzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
additional params for signatureLine
parent
9cdbde6c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
20 deletions
+29
-20
common/Drawings/CommonController.js
common/Drawings/CommonController.js
+13
-3
common/Drawings/Format/Shape.js
common/Drawings/Format/Shape.js
+13
-14
common/apiBase.js
common/apiBase.js
+1
-1
word/api.js
word/api.js
+2
-2
No files found.
common/Drawings/CommonController.js
View file @
cba9dab5
...
...
@@ -10738,7 +10738,7 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
}
function
fCreateSignatureShape
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
bWord
,
wsModel
){
function
fCreateSignatureShape
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
bWord
,
wsModel
,
Width
,
Height
,
sImgUrl
){
var
oShape
=
new
AscFormat
.
CShape
();
oShape
.
setWordShape
(
bWord
===
true
);
oShape
.
setBDeleted
(
false
);
...
...
@@ -10748,8 +10748,18 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
var
oXfrm
=
new
AscFormat
.
CXfrm
();
oXfrm
.
setOffX
(
0
);
oXfrm
.
setOffY
(
0
);
if
(
AscFormat
.
isRealNumber
(
Width
)
&&
AscFormat
.
isRealNumber
(
Height
)){
oXfrm
.
setExtX
(
1828800
/
36000
);
oXfrm
.
setExtY
(
1828800
/
36000
);
}
else
{
oXfrm
.
setExtX
(
Width
);
oXfrm
.
setExtY
(
Height
);
}
if
(
typeof
sImgUrl
===
"
string
"
&&
sImgUrl
.
length
>
0
){
var
oBlipFillUnifill
=
AscFormat
.
CreateBlipFillUniFillFromUrl
(
sImgUrl
);
oSpPr
.
setFill
(
oBlipFillUnifill
);
}
oSpPr
.
setXfrm
(
oXfrm
);
oXfrm
.
setParent
(
oSpPr
);
oSpPr
.
setFill
(
AscFormat
.
CreateNoFillUniFill
());
...
...
common/Drawings/Format/Shape.js
View file @
cba9dab5
...
...
@@ -2531,12 +2531,6 @@ CShape.prototype.recalculateTextStyles = function (level) {
};
CShape
.
prototype
.
recalculateBrush
=
function
()
{
if
(
this
.
signatureLine
){
this
.
brush
=
AscFormat
.
CreateBlipFillUniFillFromUrl
(
""
);
return
;
}
var
compiled_style
=
this
.
getCompiledStyle
();
var
RGBA
=
{
R
:
0
,
G
:
0
,
B
:
0
,
A
:
255
};
var
parents
=
this
.
getParentObjects
();
...
...
@@ -4084,13 +4078,7 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex)
return
;
}
if
(
this
.
signatureLine
){
var
sSignatureUrl
=
""
;
if
(
typeof
editor
!==
"
undefined
"
&&
editor
){
sSignatureUrl
=
editor
.
asc_getSignatureImage
(
this
.
signatureLine
.
id
);
}
this
.
brush
=
AscFormat
.
CreateBlipFillUniFillFromUrl
(
sSignatureUrl
);
}
var
_transform
=
transform
?
transform
:
this
.
transform
;
var
_transform_text
=
transformText
?
transformText
:
this
.
transformText
;
if
(
graphics
.
IsSlideBoundsCheckerType
===
true
)
{
...
...
@@ -4132,6 +4120,17 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex)
return
;
}
var
_oldBrush
=
this
.
brush
;
if
(
this
.
signatureLine
){
var
sSignatureUrl
=
null
;
if
(
typeof
editor
!==
"
undefined
"
&&
editor
){
sSignatureUrl
=
editor
.
asc_getSignatureImage
(
this
.
signatureLine
.
id
);
}
if
(
typeof
sSignatureUrl
===
"
string
"
&&
sSignatureUrl
.
length
>
0
){
this
.
brush
=
AscFormat
.
CreateBlipFillUniFillFromUrl
(
sSignatureUrl
);
}
}
if
(
this
.
spPr
&&
this
.
spPr
.
geometry
||
this
.
style
||
(
this
.
brush
&&
this
.
brush
.
fill
)
||
(
this
.
pen
&&
this
.
pen
.
Fill
&&
this
.
pen
.
Fill
.
fill
))
{
graphics
.
SetIntegerGrid
(
false
);
graphics
.
transform3
(
_transform
,
false
);
...
...
@@ -4208,7 +4207,7 @@ CShape.prototype.draw = function (graphics, transform, transformText, pageIndex)
graphics
.
SetIntegerGrid
(
true
);
}
}
this
.
brush
=
_oldBrush
;
var
oController
=
this
.
getDrawingObjectsController
&&
this
.
getDrawingObjectsController
();
if
(
!
this
.
txWarpStruct
&&
!
this
.
txWarpStructParamarksNoTransform
||
(
!
this
.
txWarpStructParamarksNoTransform
&&
oController
&&
(
AscFormat
.
getTargetTextObject
(
oController
)
===
this
)
||
(
!
this
.
txBody
&&
!
this
.
textBoxContent
))
/*|| this.haveSelectedDrawingInContent()*/
)
{
...
...
common/apiBase.js
View file @
cba9dab5
...
...
@@ -1257,7 +1257,7 @@
{
};
baseEditorsApi
.
prototype
.
asc_addSignatureLine
=
function
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
)
{
baseEditorsApi
.
prototype
.
asc_addSignatureLine
=
function
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
Width
,
Height
,
sImgUrl
)
{
};
baseEditorsApi
.
prototype
.
asc_getAllSignatures
=
function
()
{
...
...
word/api.js
View file @
cba9dab5
...
...
@@ -3502,12 +3502,12 @@ background-repeat: no-repeat;\
};
// signatures
asc_docs_api
.
prototype
.
asc_addSignatureLine
=
function
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
)
{
asc_docs_api
.
prototype
.
asc_addSignatureLine
=
function
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
Width
,
Height
,
sImgUrl
)
{
if
(
false
===
this
.
WordControl
.
m_oLogicDocument
.
Document_Is_SelectionLocked
(
AscCommon
.
changestype_Document_Content_Add
))
{
this
.
WordControl
.
m_oLogicDocument
.
Create_NewHistoryPoint
(
AscDFH
.
historydescription_Document_InsertSignatureLine
);
var
oSignature
=
AscFormat
.
fCreateSignatureShape
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
true
,
null
);
var
oSignature
=
AscFormat
.
fCreateSignatureShape
(
sGuid
,
sSigner
,
sSigner2
,
sEmail
,
true
,
null
,
Width
,
Height
,
sImgUrl
);
var
Drawing
=
new
AscCommonWord
.
ParaDrawing
(
oSignature
.
spPr
.
xfrm
.
extX
,
oSignature
.
spPr
.
xfrm
.
extY
,
null
,
this
.
WordControl
.
m_oDrawingDocument
,
null
,
null
);
oSignature
.
setParent
(
Drawing
);
Drawing
.
Set_GraphicObject
(
oSignature
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment