Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class CanvasPosition
/// Gets or sets JsonProperty "sectionIndex"
/// </summary>
[JsonPropertyName("sectionIndex")]
public int SectionIndex { get; set; }
public float SectionIndex { get; set; }

/// <summary>
/// Gets or sets JsonProperty "sectionFactor"
Expand Down
8 changes: 4 additions & 4 deletions src/sdk/PnP.Core/Model/SharePoint/Pages/Internal/Page.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1188,7 +1188,7 @@ private void LoadFromHtml(string html, string pageHeaderHtml)
{
if (sectionData.Position.LayoutIndex.HasValue)
{
currentSection.AddColumn(new CanvasColumn(currentSection, sectionData.Position.SectionIndex, sectionData.Position.SectionFactor, sectionData.Position.LayoutIndex.Value));
currentSection.AddColumn(new CanvasColumn(currentSection, (int)sectionData.Position.SectionIndex, sectionData.Position.SectionFactor, sectionData.Position.LayoutIndex.Value));
currentColumn = currentSection.Columns.Where(p => p.Order == sectionData.Position.SectionIndex && p.LayoutIndex == sectionData.Position.LayoutIndex.Value).First();

// ZoneEmphasis on a vertical section column needs to be retained as that "overrides" the zone emphasis set on the section
Expand All @@ -1199,7 +1199,7 @@ private void LoadFromHtml(string html, string pageHeaderHtml)
}
else
{
currentSection.AddColumn(new CanvasColumn(currentSection, sectionData.Position.SectionIndex, sectionData.Position.SectionFactor));
currentSection.AddColumn(new CanvasColumn(currentSection, (int)sectionData.Position.SectionIndex, sectionData.Position.SectionFactor));
currentColumn = currentSection.Columns.Where(p => p.Order == sectionData.Position.SectionIndex).First();
}
}
Expand Down Expand Up @@ -1435,7 +1435,7 @@ private void ApplySectionAndColumn(CanvasControl control, CanvasControlPosition
{
if (position.LayoutIndex.HasValue)
{
(currentSection as CanvasSection).AddColumn(new CanvasColumn(currentSection as CanvasSection, position.SectionIndex, position.SectionFactor, position.LayoutIndex.Value));
(currentSection as CanvasSection).AddColumn(new CanvasColumn(currentSection as CanvasSection, (int)position.SectionIndex, position.SectionFactor, position.LayoutIndex.Value));
currentColumn = currentSection.Columns.Where(p => p.Order == position.SectionIndex && p.LayoutIndex == position.LayoutIndex.Value).First();

// ZoneEmphasis on a vertical section column needs to be retained as that "overrides" the zone emphasis set on the section
Expand All @@ -1446,7 +1446,7 @@ private void ApplySectionAndColumn(CanvasControl control, CanvasControlPosition
}
else
{
(currentSection as CanvasSection).AddColumn(new CanvasColumn(currentSection as CanvasSection, position.SectionIndex, position.SectionFactor));
(currentSection as CanvasSection).AddColumn(new CanvasColumn(currentSection as CanvasSection, (int)position.SectionIndex, position.SectionFactor));
currentColumn = currentSection.Columns.Where(p => p.Order == position.SectionIndex).First();
}
}
Expand Down