Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docxtemplater-image-module
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
npm
docxtemplater-image-module
Commits
acb23e89
Commit
acb23e89
authored
Dec 13, 2015
by
Edgar HIPP
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.x'
parents
103431b1
333cddeb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
coffee/index.coffee
+7
-2
No files found.
coffee/index.coffee
View file @
acb23e89
...
...
@@ -45,6 +45,13 @@ class ImageModule
tagValue
=
scopeManager
.
getValue
(
tag
)
tagXml
=
@
manager
.
getInstance
(
'xmlTemplater'
).
tagXml
tagXmlParagraph
=
tagXml
.
substr
(
0
,
1
)
+
':p'
if
@
options
.
centered
==
false
outsideElement
=
tagXml
if
@
options
.
centered
==
true
outsideElement
=
tagXmlParagraph
startEnd
=
"<
#{
tagXml
}
></
#{
tagXml
}
>"
if
!
tagValue
?
then
return
@
replaceBy
(
startEnd
,
tagXml
)
try
...
...
@@ -59,10 +66,8 @@ class ImageModule
size
=
[
@
convertPixelsToEmus
(
sizePixel
[
0
]),
@
convertPixelsToEmus
(
sizePixel
[
1
])]
if
@
options
.
centered
==
false
outsideElement
=
tagXml
newText
=
@
getImageXml
(
rId
,
size
)
if
@
options
.
centered
==
true
outsideElement
=
tagXml
.
substr
(
0
,
1
)
+
':p'
newText
=
@
getImageXmlCentered
(
rId
,
size
)
@
replaceBy
(
newText
,
outsideElement
)
...
...
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