Merge branch 'develop' of https://gitlab.steamware.net/egalware-web/special/webdoorcreator into develop
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<svg viewBox="0 0 @ObjW @ObjH" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="white" fill-opacity="0.1"></rect>
|
||||
<g transform="translate(0,@LineDist)">
|
||||
<foreignObject width="@TextAreaWidth" height="@TextAreaHeight">
|
||||
<div class="row" style="@TextStyle">
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
<svg viewBox="0 0 @ObjW @ObjH" width="100%" height="100%" xmlns="http://www.w3.org/2000/svg">
|
||||
<g transform="translate(0,@LineDist)">
|
||||
<foreignObject width="@TextAreaWidth" height="@TextAreaHeight">
|
||||
<div class="row" style="@TextStyle">
|
||||
@foreach (var item in TextData)
|
||||
{
|
||||
<div class="@LeftTextClass">
|
||||
@item.Key
|
||||
</div>
|
||||
<div class="@RightTextClass text-end">
|
||||
<b>@item.Value</b>
|
||||
</div>
|
||||
}
|
||||
<defs>
|
||||
<clipPath id="theClippingPath">
|
||||
<path d="@PathClipData" />
|
||||
</clipPath>
|
||||
</defs>
|
||||
<rect x="0" y="0" width="100%" height="100%" fill="#34495E"></rect>
|
||||
<image href="@ImagePath" height="100%" width="100%" clip-path="url(#theClippingPath)"></image>
|
||||
<path d="@PathLineData" stroke="@LineColor" stroke-width="@LineWidth" fill="none" />
|
||||
<g transform="translate(0,@(ObjH/4))">
|
||||
<foreignObject width="@(ObjW/2)" height="@(ObjH/3)">
|
||||
<div class="row text-white text-center">
|
||||
<div style="@TitleStyle" class="text-uppercase">
|
||||
@TitleText
|
||||
</div>
|
||||
<div style="@BodyStyle">
|
||||
@BodyText
|
||||
</div>
|
||||
<div class="mt-5">
|
||||
<button class="btn btn-lg btn-primary rounded-pill p-3 px-4 text-uppercase">
|
||||
@ButtonText
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
</g>
|
||||
|
||||
<line x1="@BaseLine.p1.px" y1="@BaseLine.p1.py" x2="@BaseLine.p2.px" y2="@BaseLine.p2.py" stroke="@LineColor" stroke-width="@LineWidth" />
|
||||
<circle id="circleLine" cx="@CircleLine.cx" cy="@CircleLine.cy" r="@CircleLine.rad" stroke="@LineColor" stroke-width="@LineWidth" />
|
||||
|
||||
<defs>
|
||||
<pattern id="@($"contImg_{ObjId}")" patternContentUnits="userSpaceOnUse" width="1" height="1">
|
||||
<image x="0" y="0" href="@ImagePath" width="50%" height="100%"></image>
|
||||
</pattern>
|
||||
</defs>
|
||||
<circle id="circleCont" cx="@CircleImg.cx" cy="@CircleImg.cy" r="@CircleImg.rad" fill="url(#@($"contImg_{ObjId}"))" @onclick="()=>execFunc()" style="cursor: pointer" />
|
||||
</svg>
|
||||
|
||||
@@ -6,17 +6,26 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Parameter]
|
||||
public string BodyStyle { get; set; } = "font-size: 2em;";
|
||||
|
||||
[Parameter]
|
||||
public string BodyText { get; set; } = "Body Text";
|
||||
|
||||
[Parameter]
|
||||
public string ButtonText { get; set; } = "Button Text";
|
||||
|
||||
[Parameter]
|
||||
public EventCallback<bool> EC_ExeFunct { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string ImagePath { get; set; } = "images/LogoEgw.png";
|
||||
public string ImagePath { get; set; } = "images/DOORBG.png";
|
||||
|
||||
[Parameter]
|
||||
public string LineColor { get; set; } = "#00838F";
|
||||
public string LineColor { get; set; } = "#3989CC";
|
||||
|
||||
[Parameter]
|
||||
public int LineWidth { get; set; } = 8;
|
||||
public int LineWidth { get; set; } = 16;
|
||||
|
||||
[Parameter]
|
||||
public int ObjH { get; set; } = 204;
|
||||
@@ -28,41 +37,55 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
public int ObjW { get; set; } = 450;
|
||||
|
||||
[Parameter]
|
||||
public Dictionary<string, string> TextData { get; set; } = new Dictionary<string, string>();
|
||||
public int StartPoint { get; set; } = 220;
|
||||
|
||||
[Parameter]
|
||||
public string TextStyle { get; set; } = "font-size: 1.5em; fill: #000;";
|
||||
public string TitleStyle { get; set; } = "font-size: 5em;";
|
||||
|
||||
[Parameter]
|
||||
public string Message1 { get; set; } = "";
|
||||
[Parameter]
|
||||
public string Message2 { get; set; } = "";
|
||||
|
||||
[Parameter]
|
||||
public string LeftTextClass { get; set; } = "";
|
||||
[Parameter]
|
||||
public string RightTextClass { get; set; } = "";
|
||||
public string TitleText { get; set; } = "Title Text";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected LineData BaseLine { get; set; } = null!;
|
||||
protected List<PointData> PathClip { get; set; } = null!;
|
||||
|
||||
protected CircleData CircleImg { get; set; } = null!;
|
||||
|
||||
protected CircleData CircleLine { get; set; } = null!;
|
||||
|
||||
protected int LineDist { get; set; } = 20;
|
||||
|
||||
protected int TextAreaHeight
|
||||
protected string PathClipData
|
||||
{
|
||||
get => (ObjH * 96 / 100);
|
||||
get
|
||||
{
|
||||
//string path = $"{PathLineData} L1200,0 L1920,0 L1920,1080 L900,1080 Z";
|
||||
string path = PathLineData;
|
||||
if (pathClipCloseList.Count > 0)
|
||||
{
|
||||
for (int i = 0; i < pathClipCloseList.Count; i++)
|
||||
{
|
||||
path += $" L{pathClipCloseList[i].px},{pathClipCloseList[i].py}";
|
||||
}
|
||||
}
|
||||
path += " Z";
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
protected int TextAreaWidth
|
||||
protected List<PointData> PathLine { get; set; } = null!;
|
||||
|
||||
protected string PathLineData
|
||||
{
|
||||
get => ObjW - (ObjH * 120 / 100);
|
||||
get
|
||||
{
|
||||
string path = "";
|
||||
if (pathPointList.Count > 0)
|
||||
{
|
||||
path = $"M{pathPointList[0].px},{pathPointList[0].py} Q";
|
||||
for (int i = 1; i < pathPointList.Count; i++)
|
||||
{
|
||||
path += $" {pathPointList[i].px},{pathPointList[i].py}";
|
||||
}
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Protected Properties
|
||||
@@ -79,52 +102,32 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
setupGraphParams();
|
||||
}
|
||||
|
||||
protected void setupGraphParams()
|
||||
{
|
||||
// calcolo i dati necessari a disegnare
|
||||
int deltaX = 20;
|
||||
int deltaY = 400;
|
||||
// inizio aggiungendo punti parametrici
|
||||
pathPointList.Add(new PointData(StartPoint, ObjH));
|
||||
pathPointList.Add(new PointData(StartPoint + deltaX, ObjH - deltaY));
|
||||
pathPointList.Add(new PointData(ObjW / 2, ObjH / 2));
|
||||
pathPointList.Add(new PointData(ObjW - (StartPoint + deltaX), deltaY));
|
||||
pathPointList.Add(new PointData(ObjW - StartPoint, 0));
|
||||
// ora provvedo x la parte clip
|
||||
pathClipCloseList.Add(new PointData(ObjW - StartPoint, 0));
|
||||
pathClipCloseList.Add(new PointData(ObjW, 0));
|
||||
pathClipCloseList.Add(new PointData(ObjW, ObjH));
|
||||
pathClipCloseList.Add(new PointData(StartPoint, ObjH));
|
||||
|
||||
}
|
||||
|
||||
protected List<PointData> pathPointList = new List<PointData>();
|
||||
protected List<PointData> pathClipCloseList = new List<PointData>();
|
||||
|
||||
#endregion Protected Methods
|
||||
|
||||
#region Protected Classes
|
||||
|
||||
protected class CircleData
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public CircleData(int px, int py, int radius)
|
||||
{
|
||||
cx = px;
|
||||
cy = py;
|
||||
rad = radius;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public int cx { get; set; } = 0;
|
||||
public int cy { get; set; } = 0;
|
||||
public int rad { get; set; } = 100;
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
protected class LineData
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public LineData(PointData pA, PointData pB)
|
||||
{
|
||||
p1 = pA;
|
||||
p2 = pB;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public PointData p1 { get; set; }
|
||||
public PointData p2 { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
protected class PointData
|
||||
{
|
||||
#region Public Constructors
|
||||
@@ -146,18 +149,5 @@ namespace WebDoorCreator.UI.Components.SvgComp
|
||||
}
|
||||
|
||||
#endregion Protected Classes
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void setupGraphParams()
|
||||
{
|
||||
// calcolo i dati del cerchi...
|
||||
CircleLine = new CircleData(ObjW - LineWidth - (ObjH / 2), ObjH / 2, (ObjH - LineWidth) / 2);
|
||||
CircleImg = new CircleData(ObjW - LineWidth - (ObjH / 2), ObjH / 2, (ObjH - 2 * LineWidth) / 2);
|
||||
BaseLine = new LineData(new PointData(0, ObjH - LineWidth / 2), new PointData(ObjW - LineWidth - (ObjH / 2), ObjH - LineWidth / 2));
|
||||
LineDist = ObjH / 4;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -2,8 +2,7 @@
|
||||
|
||||
<PageTitle>Index</PageTitle>
|
||||
|
||||
<div class="bgbg">
|
||||
<div class="transpLayer">
|
||||
<div class="fs-1 p-2 px-3">Web Door Creator</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="shadow-lg">
|
||||
<HomeCard ObjH="1080" ObjW="1920" StartPoint="750" TitleText="Web Door Creator" BodyText="The new way to create doors" ButtonText="Go To Orders"></HomeCard>
|
||||
</div>
|
||||
|
||||
@@ -15,12 +15,12 @@ order:
|
||||
date: 2023-05-10T00:00:00.0000000Z
|
||||
piece: DO_1
|
||||
properties: Oak
|
||||
finishing: Veneer
|
||||
finishing: Varnishing
|
||||
size:
|
||||
width: 33.81
|
||||
height: 81
|
||||
width: 33.8125
|
||||
height: 81.25
|
||||
thickness: 1.75
|
||||
swing: RHRI
|
||||
swing: LH
|
||||
secure: UP
|
||||
material: wood
|
||||
profiles:
|
||||
@@ -41,22 +41,10 @@ profiles:
|
||||
machining: ON
|
||||
overmaterial: 0.1
|
||||
hardware:
|
||||
flush_pulls:
|
||||
- template: Generic\Circle
|
||||
position: 35
|
||||
back_set: 6
|
||||
depth: 1
|
||||
face: secure
|
||||
- template: Generic\Circle
|
||||
position: 35
|
||||
back_set: 5
|
||||
depth: 1
|
||||
face: secure
|
||||
- template: Generic\Circle
|
||||
position: 35
|
||||
back_set: 5
|
||||
depth: 1
|
||||
face: secure
|
||||
ept:
|
||||
- template: Generic\StdEPT
|
||||
ToptoCL: 15
|
||||
FacetoCL: 0.875
|
||||
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user