Skip to content

Commit e231be4

Browse files
committed
Merge remote-tracking branch 'origin/feature-add-media-files'
2 parents 93b4167 + f828b66 commit e231be4

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/shapes/image.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ export class Image extends Shape implements IImage {
2929
this.relType =
3030
'http://schemas.openxmlformats.org/officeDocument/2006/relationships/image';
3131

32+
// A shape retrieved by Image.getAllOnSlide() can also be (nested) SVG.
33+
if (!shape.sourceMode && this.extension === 'svg') {
34+
shape.sourceMode = 'image:svg';
35+
}
36+
3237
switch (shape.sourceMode) {
3338
case 'image:svg':
3439
this.relRootTag = TargetByRelIdMap['image:svg'].relRootTag;
@@ -63,15 +68,6 @@ export class Image extends Shape implements IImage {
6368
await this.prepare(targetTemplate, targetSlideNumber);
6469
await this.updateElementsRelId();
6570

66-
// TODO: Process related svg/media content on added slides
67-
// if (this.hasSvgBlipRelation()) {
68-
// await this.processRelatedContent(
69-
// targetTemplate,
70-
// targetSlideNumber,
71-
// 'image:svg',
72-
// );
73-
// }
74-
7571
return this;
7672
}
7773

0 commit comments

Comments
 (0)