fix: [rd] 기획디자인 연결선 화살표 제거, 단순 곡선으로 변경
This commit is contained in:
@@ -1407,39 +1407,9 @@ function planningCanvas() {
|
||||
// 현재 내용 클리어
|
||||
svg.innerHTML = '';
|
||||
|
||||
// defs (arrowhead marker)
|
||||
const NS = 'http://www.w3.org/2000/svg';
|
||||
const defs = document.createElementNS(NS, 'defs');
|
||||
|
||||
const marker = document.createElementNS(NS, 'marker');
|
||||
marker.setAttribute('id', 'arrowhead');
|
||||
marker.setAttribute('markerWidth', '10');
|
||||
marker.setAttribute('markerHeight', '7');
|
||||
marker.setAttribute('refX', '9');
|
||||
marker.setAttribute('refY', '3.5');
|
||||
marker.setAttribute('orient', 'auto');
|
||||
const poly = document.createElementNS(NS, 'polygon');
|
||||
poly.setAttribute('points', '0 0, 10 3.5, 0 7');
|
||||
poly.setAttribute('fill', '#94a3b8');
|
||||
marker.appendChild(poly);
|
||||
|
||||
const markerSel = document.createElementNS(NS, 'marker');
|
||||
markerSel.setAttribute('id', 'arrowhead-sel');
|
||||
markerSel.setAttribute('markerWidth', '10');
|
||||
markerSel.setAttribute('markerHeight', '7');
|
||||
markerSel.setAttribute('refX', '9');
|
||||
markerSel.setAttribute('refY', '3.5');
|
||||
markerSel.setAttribute('orient', 'auto');
|
||||
const polySel = document.createElementNS(NS, 'polygon');
|
||||
polySel.setAttribute('points', '0 0, 10 3.5, 0 7');
|
||||
polySel.setAttribute('fill', '#6366f1');
|
||||
markerSel.appendChild(polySel);
|
||||
|
||||
defs.appendChild(marker);
|
||||
defs.appendChild(markerSel);
|
||||
svg.appendChild(defs);
|
||||
|
||||
// 기존 연결선
|
||||
// 기존 연결선 (화살표 없이 단순 곡선)
|
||||
const self = this;
|
||||
this.connections.forEach(conn => {
|
||||
const d = this.getConnectionPath(conn);
|
||||
@@ -1450,7 +1420,7 @@ function planningCanvas() {
|
||||
path.setAttribute('stroke', isSel ? '#6366f1' : '#94a3b8');
|
||||
path.setAttribute('stroke-width', isSel ? '3' : '2');
|
||||
path.setAttribute('fill', 'none');
|
||||
path.setAttribute('marker-end', isSel ? 'url(#arrowhead-sel)' : 'url(#arrowhead)');
|
||||
path.setAttribute('stroke-linecap', 'round');
|
||||
path.style.pointerEvents = 'stroke';
|
||||
path.style.cursor = 'pointer';
|
||||
path.addEventListener('click', () => { self.selectConnection(conn); });
|
||||
@@ -1465,7 +1435,7 @@ function planningCanvas() {
|
||||
temp.setAttribute('stroke-width', '2');
|
||||
temp.setAttribute('stroke-dasharray', '6 3');
|
||||
temp.setAttribute('fill', 'none');
|
||||
temp.setAttribute('marker-end', 'url(#arrowhead-sel)');
|
||||
temp.setAttribute('stroke-linecap', 'round');
|
||||
temp.style.pointerEvents = 'none';
|
||||
svg.appendChild(temp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user