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
a6c4c975
Commit
a6c4c975
authored
Nov 17, 2016
by
Sergey Luzyanin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
createShapeAndInsertContent
parent
b8cbe2b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
common/Charts/DrawingObjects.js
common/Charts/DrawingObjects.js
+19
-0
No files found.
common/Charts/DrawingObjects.js
View file @
a6c4c975
...
...
@@ -1715,6 +1715,25 @@ function DrawingObjects() {
return
copyObject
;
};
_this
.
createShapeAndInsertContent
=
function
(
oParaContent
){
var
track_object
=
new
AscFormat
.
NewShapeTrack
(
"
textRect
"
,
0
,
0
,
Asc
[
'
editor
'
].
wbModel
.
theme
,
null
,
null
,
null
,
0
);
track_object
.
track
({},
0
,
0
);
var
shape
=
track_object
.
getShape
(
false
,
_this
.
drawingDocument
,
this
);
shape
.
spPr
.
setFill
(
AscFormat
.
CreateNoFillUniFill
());
shape
.
setParent
(
this
);
shape
.
txBody
.
content
.
Content
[
0
].
Add_ToContent
(
0
,
oParaContent
);
var
body_pr
=
shape
.
getBodyPr
();
var
w
=
shape
.
txBody
.
getMaxContentWidth
(
150
,
true
)
+
body_pr
.
lIns
+
body_pr
.
rIns
;
var
h
=
shape
.
txBody
.
content
.
Get_SummaryHeight
()
+
body_pr
.
tIns
+
body_pr
.
bIns
;
shape
.
spPr
.
xfrm
.
setExtX
(
w
);
shape
.
spPr
.
xfrm
.
setExtY
(
h
);
shape
.
spPr
.
xfrm
.
setOffX
(
0
);
shape
.
spPr
.
xfrm
.
setOffY
(
0
);
shape
.
setWorksheet
(
worksheet
.
model
);
shape
.
addToDrawingObjects
();
return
shape
;
};
//-----------------------------------------------------------------------------------
// Public methods
//-----------------------------------------------------------------------------------
...
...
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