fix updateReferences
parent
8810e62aaa
commit
60b60ecaef
|
@ -254,7 +254,6 @@ export default {
|
||||||
const updateReferences = (el) => {
|
const updateReferences = (el) => {
|
||||||
const selElems = svgCanvas.getSelectedElems();
|
const selElems = svgCanvas.getSelectedElems();
|
||||||
mtypes.forEach((pos) => {
|
mtypes.forEach((pos) => {
|
||||||
const id = 'mkr_' + pos + '_' + el.id;
|
|
||||||
const markerName = 'marker-' + pos;
|
const markerName = 'marker-' + pos;
|
||||||
const marker = getLinked(el, markerName);
|
const marker = getLinked(el, markerName);
|
||||||
if (!marker || !marker.attributes.se_type) { return; } // not created by this extension
|
if (!marker || !marker.attributes.se_type) { return; } // not created by this extension
|
||||||
|
@ -263,10 +262,9 @@ export default {
|
||||||
const len = el.id.length;
|
const len = el.id.length;
|
||||||
const linkid = url.substr(-len - 1, len);
|
const linkid = url.substr(-len - 1, len);
|
||||||
if (el.id !== linkid) {
|
if (el.id !== linkid) {
|
||||||
const val = $id(pos + '_marker').getAttribute('value');
|
const newMarkerId = 'mkr_' + pos + '_' + el.id;
|
||||||
addMarker(id, val);
|
addMarker(newMarkerId, marker.attributes.se_type.value);
|
||||||
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + id + ')');
|
svgCanvas.changeSelectedAttribute(markerName, 'url(#' + newMarkerId + ')');
|
||||||
if (el.tagName === 'line' && pos === 'mid') { el = convertline(el); }
|
|
||||||
svgCanvas.call('changed', selElems);
|
svgCanvas.call('changed', selElems);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue