I want to build SVG paths with Kendo templates binding with MVVM view model. See this JS fiddle.
Known Issue:
In Firefox, when we inspect the SVG element and edit that SVG tag element (right click and select "Edit SVG") then the SVG is rendering.
But in IE 10, no path tags are found in the SVG tag.
HTML Code:
<div class="canvasTabContainer leftFloat" style="height: 522px;">
<div class="canvasHolder workflowContainer_#= tabId #">
<div class="canvasContainer relPosition">
<svg id="edges_#= tabId #" width="100%" data-template="canvasEdges_renderer" data-bind="source: edges" height="99%" class="pAbsolute" style=""></svg>
<div id="items_#= tabId #" class="items relPosition" data-template="canvasItems_renderer" data-bind="source: items"></div>
</div>
</div>
</div>
<script id="canvasItems_renderer" type="text/x-kendo-template">
< div class = "canvasMatrixCell"
itemid = "#=id#" > Item# = id# < /div>
</script>
<script id="canvasEdges_renderer" type="text/x-kendo-template">
< path d = "#= svgPath #"
class = "js-no-pan edgeStyle" > < /path>
</script>
JavaScript:
var canvasViewModel = [{
"id": 1
}];
var canvasEdgeModel = [{
"svgPath": "M382,121.5L396,121.5s 10 0 10 -10L406,50.5s 0 -10 10 -10L430,40.5M427,36.5L431,40.5L427,44.5"
}];
var canvasViewModel = kendo.observable({
items: canvasViewModel,
edges: canvasEdgeModel
});
kendo.bind($(".canvasHolder"), this.canvasViewModel);
It is not working in Firefox 29.0.1 & IE 10.