Skip to content

Commit f9d81a7

Browse files
committed
975476: RemovedObsolete
1 parent 88db4b5 commit f9d81a7

5 files changed

Lines changed: 45 additions & 17 deletions

File tree

Blazor-MAUI-Demos/Pages/Diagram/Diagram/SymbolPalette.razor

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -532,11 +532,25 @@
532532
string description = symbol is Node ? (symbol as Node).ID : (symbol as Connector).ID;
533533
if (text)
534534
{
535-
SymbolInfo.Description = new SymbolDescription() { Text = description, TextOverflow = TextOverflow.Wrap };
535+
SymbolInfo.Description = new SymbolDescription()
536+
{
537+
Text = description,
538+
Style = new TextStyle()
539+
{
540+
TextOverflow = TextOverflow.Wrap
541+
}
542+
};
536543
}
537544
else
538545
{
539-
SymbolInfo.Description = new SymbolDescription() { Text = "", TextOverflow = TextOverflow.Wrap };
546+
SymbolInfo.Description = new SymbolDescription()
547+
{
548+
Text = "",
549+
Style = new TextStyle()
550+
{
551+
TextOverflow = TextOverflow.Wrap
552+
}
553+
};
540554
}
541555
return SymbolInfo;
542556
}

Common/Pages/AISamples/Diagram/Helpers/DiagramMenuBar.razor.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ private async Task MenuClick(Syncfusion.Blazor.Navigations.MenuEventArgs<Context
346346
{
347347
diagram.EndGroupAction();
348348
}
349-
await diagram.EndUpdate();
349+
await diagram.EndUpdateAsync();
350350
break;
351351
case "duplicate":
352352
Edit = true; IsDuplicate = true;
@@ -385,7 +385,7 @@ private async Task MenuClick(Syncfusion.Blazor.Navigations.MenuEventArgs<Context
385385
view = true;
386386
diagram.BeginUpdate();
387387
Parent.SnapConstraint = Parent.SnapConstraint ^ SnapConstraints.ShowLines;
388-
await diagram.EndUpdate();
388+
await diagram.EndUpdateAsync();
389389
ViewMenuItems[5].IconCss = ViewMenuItems[5].IconCss == "sf-icon-blank" ? "sf-icon-Selection" : "sf-icon-blank";
390390
break;
391391
case "fittoscreen":
@@ -512,7 +512,7 @@ private async Task OnUploadFileSelected(Syncfusion.Blazor.Inputs.UploadingEventA
512512
await Task.Delay(100);
513513
string json = await FileUtil.LoadFile(jsRuntime, args.FileData);
514514
json = json.Replace(System.Environment.NewLine, string.Empty);
515-
await Parent.Diagram.LoadDiagram(json.ToString());
515+
await Parent.Diagram.LoadDiagramAsync(json.ToString());
516516
IsJsonLoading = false;
517517
}
518518
else
@@ -521,7 +521,7 @@ private async Task OnUploadFileSelected(Syncfusion.Blazor.Inputs.UploadingEventA
521521
Node Node = Diagram.SelectionSettings.Nodes[0];
522522
Diagram.BeginUpdate();
523523
Node.Shape = new ImageShape() { Type = NodeShapes.Image, Source = args.FileData.RawFile.ToString() };
524-
await Diagram.EndUpdate();
524+
await Diagram.EndUpdateAsync();
525525
}
526526
}
527527
/// <summary>

Common/Pages/AISamples/Diagram/TextToMindMap.razor

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@
304304
{
305305
Diagram.BeginUpdate();
306306
RemoveData(Diagram.SelectionSettings.Nodes[0], Diagram);
307-
_ = Diagram.EndUpdate();
308-
await Diagram.DoLayout();
307+
_ = Diagram.EndUpdateAsync();
308+
await Diagram.DoLayoutAsync();
309309
}
310310
if (obj.Name == "fitPage")
311311
{
@@ -667,7 +667,7 @@
667667
};
668668
diagram.BeginUpdate();
669669
await UpdatePortConnection(childNode, diagram, isSibling);
670-
await diagram.EndUpdate();
670+
await diagram.EndUpdateAsync();
671671
}
672672
// Custom tool to add the node.
673673
public class AddLeftTool : InteractionControllerBase
@@ -716,7 +716,7 @@
716716
TargetID = node.ID,
717717
SourceID = isSibling ? childNode.ParentId : diagram.SelectionSettings.Nodes[0].ID
718718
};
719-
await diagram.AddDiagramElements(new DiagramObjectCollection<NodeBase>() { node, connector });
719+
await diagram.AddDiagramElementsAsync(new DiagramObjectCollection<NodeBase>() { node, connector });
720720
Node sourceNode = diagram.GetObject((connector as Connector).SourceID) as Node;
721721
Node targetNode = diagram.GetObject((connector as Connector).TargetID) as Node;
722722
if (targetNode != null && targetNode.AdditionalInfo.Count > 0)
@@ -733,7 +733,7 @@
733733
(connector as Connector).TargetPortID = targetNode.Ports[0].ID;
734734
}
735735
}
736-
await diagram.DoLayout();
736+
await diagram.DoLayoutAsync();
737737
}
738738
public void ZoomTo(ZoomOptions options)
739739
{
@@ -822,7 +822,7 @@
822822
};
823823
diagram.BeginUpdate();
824824
await UpdatePortConnection(childNode, diagram, isSibling);
825-
await diagram.EndUpdate();
825+
await diagram.EndUpdateAsync();
826826
}
827827
// Custom tool to add the node.
828828
public class AddRightTool : InteractionControllerBase
@@ -861,8 +861,8 @@
861861
{
862862
sfDiagram.BeginUpdate();
863863
RemoveData(deleteObject, sfDiagram);
864-
_ = sfDiagram.EndUpdate();
865-
await sfDiagram.DoLayout();
864+
_ = sfDiagram.EndUpdateAsync();
865+
await sfDiagram.DoLayoutAsync();
866866
}
867867
base.OnMouseUp(args);
868868
this.InAction = true;

Common/Pages/Diagram/Diagram/Serialization.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<p>This sample demonstrates building diagrams interactively and editing saved diagrams. The symbol palette is used to build diagrams easily.</p>
2020
</SampleDescription>
2121
<ActionDescription>
22-
<p>This example shows how to drag and drop shapes and connectors from the symbol palette to build diagrams. You can save a diagram as a JSON file and edit saved diagrams. The <code><a target='_blank' href='https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_SaveDiagram' aria-label="SaveDiagram">SaveDiagram</a></code> method can be used to save a diagram as a string. The <code><a target='_blank' href='https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagram_System_String_System_Boolean_' aria-label="LoadDiagram">LoadDiagram</a></code> method can be used to load a diagram from a string. In this example, the undo and redo features are enabled.</p>
22+
<p>This example shows how to drag and drop shapes and connectors from the symbol palette to build diagrams. You can save a diagram as a JSON file and edit saved diagrams. The <code><a target='_blank' href='https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_SaveDiagram' aria-label="SaveDiagram">SaveDiagram</a></code> method can be used to save a diagram as a string. The <code><a target='_blank' href='https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Diagram.SfDiagramComponent.html#Syncfusion_Blazor_Diagram_SfDiagramComponent_LoadDiagram_System_String_System_Boolean_' aria-label="LoadDiagramAsync">LoadDiagramAsync</a></code> method can be used to load a diagram from a string. In this example, the undo and redo features are enabled.</p>
2323
</ActionDescription>
2424
@*End:Hidden*@
2525
@*Hidden:Lines*@

Common/Pages/Diagram/Diagram/SymbolPalette.razor

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,25 @@
521521
string description = symbol is Node ? (symbol as Node).ID : (symbol as Connector).ID;
522522
if (text)
523523
{
524-
SymbolInfo.Description = new SymbolDescription() { Text = description, TextOverflow = TextOverflow.Wrap };
524+
SymbolInfo.Description = new SymbolDescription()
525+
{
526+
Text = description,
527+
Style = new TextStyle()
528+
{
529+
TextOverflow = TextOverflow.Wrap
530+
},
531+
};
525532
}
526533
else
527534
{
528-
SymbolInfo.Description = new SymbolDescription() { Text = "", TextOverflow = TextOverflow.Wrap };
535+
SymbolInfo.Description = new SymbolDescription()
536+
{
537+
Text = "",
538+
Style = new TextStyle()
539+
{
540+
TextOverflow = TextOverflow.Wrap
541+
},
542+
};
529543
}
530544
return SymbolInfo;
531545
}

0 commit comments

Comments
 (0)