I am assessing SyncFusion JS for my organization, we attempting to port some functionality from a desktop application to the web. Here I have a simple HTML Node with an image, however the image does not load. Do you know why this might be? Below is my code and attached are screenshots of my node with the broken image and a screenshot of the image path in VS.
@model MarketWideOnline_NewLogin.Models.PackageManager.PackageViewModel
<!—define html element-->
<script id="htmlTemplate" type="text/x-jsrender">
<img src="~/Content/images/Delete.png"/>
</script>
<div id="diagram"></div>
<script type="text/javascript">
function remove() {
var diagram = $("#diagram").ejDiagram("instance");
//to get the selected items
var selectedItem = diagram.model.selectedItems.children[0];
if (selectedItem) {
//remove the selected item
diagram.remove(selectedItem);
}
//update the layout
diagram.layout();
alert("Hello world!");
}
$(document).ready(function () {
var nodes = [{
name: "htmlNode", offsetX: 100, offsetY: 100,
width: 200, height: 100,
labels: [{text:"text"}],
//Sets type as Html
type: ej.datavisualization.Diagram.Shapes.Html,
shape: "terminator",
//Sets id of html template
templateId: "htmlTemplate",
value: "Close"
}];
//You can configure this “Employee Information” with Diagram, so that the node and connector are automatically generated using mapping properties.
//The following code examples show how dataSourceSetting is used to map id and parent with property name identifiers for employee information.
$("#diagram").ejDiagram({
width: "100%",
height: "650px",
nodes: nodes
})
});
</script>
"~/Content/images/image.png"
"../../Content/images/image.png"