Lettura BTL e rappresentazione svg per Aedifica
This commit is contained in:
@@ -10,13 +10,46 @@ namespace WebAedificaConfigurator
|
||||
{
|
||||
public partial class WebAedificaMaker
|
||||
{
|
||||
string text = "";
|
||||
string m_FilePath = "";
|
||||
string m_sSvg = "";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<string> EC_OnSave { get; set; }
|
||||
public EventCallback<Dictionary<string,string>> EC_OnSave { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string CssSvg { get; set; } = "responsive-svg";
|
||||
|
||||
[Parameter]
|
||||
public string LiveSVG
|
||||
{
|
||||
get => m_sSvg;
|
||||
set => m_sSvg = value;
|
||||
}
|
||||
|
||||
protected async Task DoSave()
|
||||
{
|
||||
await EC_OnSave.InvokeAsync(text);
|
||||
Dictionary<string,string> Args = new Dictionary<string,string>();
|
||||
Args.Add("FilePath", m_FilePath);
|
||||
Args.Add("Mode", 1.ToString());
|
||||
await EC_OnSave.InvokeAsync(Args);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Componente SVG da mostrare
|
||||
/// </summary>
|
||||
protected MarkupString outSvg
|
||||
{
|
||||
get
|
||||
{
|
||||
// aggiunta gestione classe svg per posizionamento con costraints
|
||||
var newSvg = LiveSVG.Replace("<svg", $"<svg class=\"{CssSvg}\"");
|
||||
return (MarkupString)newSvg;
|
||||
}
|
||||
}
|
||||
|
||||
private string mainCss
|
||||
{
|
||||
get => "col-6";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user