https://github.com/a115/HTML-SVG-connect I am using this plugin for draw draggable line. But this plugin don't give me the permission to recreate line after load svg. I want create line when click on two element.
Asked
Active
Viewed 1,090 times
-2
-
Please add some code to your question which you have tried so far. – Anand G Mar 06 '17 at 06:14
-
Can you provide a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – SAMUEL Mar 06 '17 at 06:16
-
https://gist.github.com/alojzije/11127839 – mnjroy Mar 06 '17 at 06:29
-
Can anyone help me ! How can I reinitialise svg without reload page. On click event or etc ? – mnjroy Mar 06 '17 at 09:45
2 Answers
0
/*css*/
svg {
width: 100% !important;
height: 100% !important;
width: 100% !important;
height: 100% !important;
position: absolute !important;
top: 0 !important;
left: 0 !important;
}

mnjroy
- 1
- 4
-
-
sorry! but this is not different answers I just "append" svg into div after some time so it automatically append one by one. So I fixed it by css with {position: absolute;}. – mnjroy Mar 20 '17 at 12:31
-
-1
addSvgInHere = function(_this, $element, $svg, defs, markerObjCircleS, circleObjS, markerObj, arrowObj) {
timerId = setInterval(function(argument) {
$element.append($svg);
if ( $(_this).attr('data-trigger') != "true") {
$(defs).appendTo($svg);
}
},500);
setInterval(function (argument) {
markerObjCircleS.appendChild(circleObjS);
markerObj.appendChild(arrowObj);
$(defs).append(markerObjCircleS);
$(defs).append(markerObj);
},1000);
};

mnjroy
- 1
- 4