Made connector lines start/end at bounding box edges, made arrow appear on end of line

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1336 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-02-03 18:42:00 +00:00
parent be0a5fa153
commit e20d3dc39f
3 changed files with 114 additions and 23 deletions

View File

@@ -30,7 +30,7 @@ $(function() {
$('#arrow_panel').toggle(on);
if(on) {
var has_arrow = selElems[0].getAttribute("marker-mid");
var has_arrow = selElems[0].getAttribute("marker-end");
$("#arrow_list").val(has_arrow?"arrow":"none");
}
}
@@ -46,7 +46,7 @@ $(function() {
"attr": {
"viewBox": "0 0 10 10",
"id": m_id,
"refX": 5,
"refX": 10,
"refY": 5,
"markerUnits": "strokeWidth",
"markerWidth": 5,
@@ -66,11 +66,11 @@ $(function() {
defs.appendChild(marker);
}
selElems[0].setAttribute("marker-mid", "url(#" + m_id + ")");
selElems[0].setAttribute("marker-end", "url(#" + m_id + ")");
}
function remArrow() {
selElems[0].removeAttribute("marker-mid");
selElems[0].removeAttribute("marker-end");
}