Skip to content

Commit f95afd3

Browse files
author
Dmitry Lapatin
committed
Multipage export fixed
New template set added: 'single-page-navigation' with PP-like navigation thumbnails on one page Honeycomb & Comb transition implementation
1 parent 71bfb15 commit f95afd3

File tree

12 files changed

+753
-136
lines changed

12 files changed

+753
-136
lines changed

Aspose.Slides.WebExtensions/Helpers/SlideHelper.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ public static string GetSlideTransitionDirection(ISlide slide)
5858
case TransitionType.Ferris:
5959
result = ((ILeftRightDirectionTransition)slide.SlideShowTransition.Value).Direction.ToString();
6060
break;
61+
case TransitionType.Comb:
62+
result = ((IOrientationTransition)slide.SlideShowTransition.Value).Direction.ToString();
63+
break;
6164
}
6265

6366
return result;

Aspose.Slides.WebExtensions/PresentationExtensions.cs

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public static void SetGlobals(WebDocument document, WebDocumentOptions options,
5252
document.Global.Put("slideMargin", 10);
5353
document.Global.Put("embedImages", options.EmbedImages);
5454
document.Global.Put("animateTransitions", options.AnimateTransitions);
55+
document.Global.Put("navigationEnabled", false);
5556
document.Global.Put("imagesPath", imagesPath);
5657
document.Global.Put("fontsPath", fontsPath);
5758
document.Global.Put("mediaPath", mediaPath);
@@ -73,6 +74,10 @@ public static WebDocument ToSinglePageWebDocument(
7374
document.Global.Put("scriptsPath", outputPath);
7475

7576
document.AddCommonInputOutput(options, templatesPath, outputPath, pres);
77+
78+
if (!options.EmbedImages)
79+
document.AddThumbnailsOutput(document.Global.Get<string>("imagesPath"), pres);
80+
7681
return document;
7782
}
7883

@@ -88,23 +93,21 @@ public static WebDocument ToMultiPageWebDocument(
8893

8994
SetGlobals(document, options, outputPath);
9095

91-
document.AddCommonInputOutput(options, templatesPath, outputPath, pres);
92-
9396
string slidesPath = Path.Combine(outputPath, "slides");
9497
string stylesPath = Path.Combine(outputPath, "styles");
9598
string scriptsPath = Path.Combine(outputPath, "scripts");
9699

97100
document.Global.Put("slidesPath", slidesPath);
98101
document.Global.Put("stylesPath", stylesPath);
99102
document.Global.Put("scriptsPath", scriptsPath);
103+
104+
document.AddCommonInputOutput(options, templatesPath, outputPath, pres);
100105

101106
document.AddMultiPageInputTemplates(templatesPath);
102107
document.AddMultiPageOutputFiles(slidesPath, pres);
103108

104109
if (!options.EmbedImages)
105-
{
106110
document.AddThumbnailsOutput(document.Global.Get<string>("imagesPath"), pres);
107-
}
108111

109112
return document;
110113
}
@@ -135,6 +138,7 @@ private static void AddCommonInputOutput(this WebDocument document, WebDocumentO
135138
document.Input.AddTemplate<Presentation>("styles-pres", Path.Combine(templatesPath, @"styles\pres.css"));
136139
document.Input.AddTemplate<MasterSlide>("styles-master", Path.Combine(templatesPath, @"styles\master.css"));
137140
document.Input.AddTemplate<Presentation>("scripts-animation", Path.Combine(templatesPath, @"scripts\animation.js"));
141+
document.Input.AddTemplate<Presentation>("scripts-navigation", Path.Combine(templatesPath, @"scripts\navigation.js"));
138142

139143
document.Input.AddTemplate<Presentation>("index", Path.Combine(templatesPath, "index.html"));
140144
document.Input.AddTemplate<Slide>("slide", Path.Combine(templatesPath, "slide.html"));
@@ -154,6 +158,7 @@ private static void AddCommonInputOutput(this WebDocument document, WebDocumentO
154158
document.Output.Add(Path.Combine(stylesPath, "pres.css"), "styles-pres", pres);
155159
document.Output.Add(Path.Combine(stylesPath, "master.css"), "styles-master", (MasterSlide)pres.Masters[0]);
156160
document.Output.Add(Path.Combine(scriptsPath, "animation.js"), "scripts-animation", pres);
161+
document.Output.Add(Path.Combine(scriptsPath, "navigation.js"), "scripts-navigation", pres);
157162

158163
document.AddEmbeddedFontsOutput(document.Global.Get<string>("fontsPath"), pres);
159164
document.AddVideoOutput(document.Global.Get<string>("mediaPath"), pres);

0 commit comments

Comments
 (0)