mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
Merge pull request #1069 from hargata/Hargata/image.map.update
Hargata/image.map.update
This commit is contained in:
commit
969b28f1b4
@ -13,5 +13,6 @@
|
|||||||
public string Coordinates { get; set; }
|
public string Coordinates { get; set; }
|
||||||
public string Color { get; set; }
|
public string Color { get; set; }
|
||||||
public decimal Opacity { get; set; }
|
public decimal Opacity { get; set; }
|
||||||
|
public string Shape { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,7 +23,15 @@
|
|||||||
@foreach(ImageMap imageMap in Model.Map)
|
@foreach(ImageMap imageMap in Model.Map)
|
||||||
{
|
{
|
||||||
<a style='cursor:pointer;' onclick='loadRecordsByTags("@imageMap.Tags")'>
|
<a style='cursor:pointer;' onclick='loadRecordsByTags("@imageMap.Tags")'>
|
||||||
|
@if(!string.IsNullOrWhiteSpace(imageMap.Shape) && imageMap.Shape.ToLower() == "circle") {
|
||||||
|
var cordParts = imageMap.Coordinates.Split(',');
|
||||||
|
if (cordParts.Length == 3)
|
||||||
|
{
|
||||||
|
<circle cx="@cordParts[0]" cy="@cordParts[1]" r="@cordParts[2]" fill="@imageMap.Color" opacity="@imageMap.Opacity.ToString(CultureInfo.InvariantCulture)"></circle>
|
||||||
|
}
|
||||||
|
} else {
|
||||||
<polygon points="@imageMap.Coordinates" fill="@imageMap.Color" opacity="@imageMap.Opacity.ToString(CultureInfo.InvariantCulture)"></polygon>
|
<polygon points="@imageMap.Coordinates" fill="@imageMap.Color" opacity="@imageMap.Opacity.ToString(CultureInfo.InvariantCulture)"></polygon>
|
||||||
|
}
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user