- Build: Update dist filles (Drawing test now fixed)
parent
96654c5f64
commit
ad80f18088
|
@ -597,15 +597,16 @@ var svgEditorExtension_connector = (function () {
|
|||
},
|
||||
elementChanged: function elementChanged(opts) {
|
||||
var elem = opts.elems[0];
|
||||
if (!elem) return;
|
||||
|
||||
if (elem && elem.tagName === 'svg' && elem.id === 'svgcontent') {
|
||||
if (elem.tagName === 'svg' && elem.id === 'svgcontent') {
|
||||
// Update svgcontent (can change on import)
|
||||
svgcontent = elem;
|
||||
init();
|
||||
} // Has marker, so change offset
|
||||
|
||||
|
||||
if (elem && (elem.getAttribute('marker-start') || elem.getAttribute('marker-mid') || elem.getAttribute('marker-end'))) {
|
||||
if (elem.getAttribute('marker-start') || elem.getAttribute('marker-mid') || elem.getAttribute('marker-end')) {
|
||||
var start = elem.getAttribute('marker-start');
|
||||
var mid = elem.getAttribute('marker-mid');
|
||||
var end = elem.getAttribute('marker-end');
|
||||
|
|
|
@ -2570,13 +2570,15 @@
|
|||
});
|
||||
|
||||
function _typeof$1(obj) {
|
||||
if (typeof Symbol === "function" && _typeof(Symbol.iterator) === "symbol") {
|
||||
_typeof$1 = function _typeof$1(obj) {
|
||||
return _typeof(obj);
|
||||
"@babel/helpers - typeof";
|
||||
|
||||
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
||||
_typeof$1 = function _typeof(obj) {
|
||||
return typeof obj;
|
||||
};
|
||||
} else {
|
||||
_typeof$1 = function _typeof$1(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof(obj);
|
||||
_typeof$1 = function _typeof(obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -2584,21 +2586,15 @@
|
|||
}
|
||||
|
||||
function _slicedToArray$1(arr, i) {
|
||||
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1();
|
||||
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
||||
}
|
||||
|
||||
function _toConsumableArray$1(arr) {
|
||||
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1();
|
||||
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
|
||||
}
|
||||
|
||||
function _arrayWithoutHoles$1(arr) {
|
||||
if (Array.isArray(arr)) {
|
||||
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
||||
}
|
||||
|
||||
function _arrayWithHoles$1(arr) {
|
||||
|
@ -2606,14 +2602,11 @@
|
|||
}
|
||||
|
||||
function _iterableToArray$1(iter) {
|
||||
if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
|
||||
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
||||
}
|
||||
|
||||
function _iterableToArrayLimit$1(arr, i) {
|
||||
if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
|
||||
var _arr = [];
|
||||
var _n = true;
|
||||
var _d = false;
|
||||
|
@ -2639,12 +2632,31 @@
|
|||
return _arr;
|
||||
}
|
||||
|
||||
function _unsupportedIterableToArray$1(o, minLen) {
|
||||
if (!o) return;
|
||||
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
||||
var n = Object.prototype.toString.call(o).slice(8, -1);
|
||||
if (n === "Object" && o.constructor) n = o.constructor.name;
|
||||
if (n === "Map" || n === "Set") return Array.from(o);
|
||||
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
||||
}
|
||||
|
||||
function _arrayLikeToArray$1(arr, len) {
|
||||
if (len == null || len > arr.length) len = arr.length;
|
||||
|
||||
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
||||
arr2[i] = arr[i];
|
||||
}
|
||||
|
||||
return arr2;
|
||||
}
|
||||
|
||||
function _nonIterableSpread$1() {
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
||||
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
function _nonIterableRest$1() {
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance");
|
||||
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
||||
}
|
||||
|
||||
function convertToString(content, type) {
|
||||
|
@ -2733,7 +2745,8 @@
|
|||
|
||||
case 'string':
|
||||
{
|
||||
var div = document.createElement('div');
|
||||
var div = document.createElement('div'); // eslint-disable-next-line no-unsanitized/property
|
||||
|
||||
div.innerHTML = content;
|
||||
return div.firstElementChild || div.firstChild;
|
||||
}
|
||||
|
|
|
@ -4117,7 +4117,7 @@ var InsertElementCommand = /*#__PURE__*/function (_Command2) {
|
|||
}
|
||||
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
|
||||
|
@ -4194,7 +4194,7 @@ var RemoveElementCommand = /*#__PURE__*/function (_Command3) {
|
|||
|
||||
removeElementFromListMap(this.elem);
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
|
||||
|
@ -10250,7 +10250,8 @@ var Layer = /*#__PURE__*/function () {
|
|||
}, {
|
||||
key: "removeGroup",
|
||||
value: function removeGroup() {
|
||||
var group = this.group_.remove();
|
||||
var group = this.group_;
|
||||
this.group_.remove();
|
||||
this.group_ = undefined;
|
||||
return group;
|
||||
}
|
||||
|
@ -14223,7 +14224,7 @@ function SvgCanvas(container, config) {
|
|||
restoreRefElems(cmd.elem);
|
||||
}
|
||||
|
||||
if (cmd.elem.tagName === 'use') {
|
||||
if (cmd.elem && cmd.elem.tagName === 'use') {
|
||||
setUseData(cmd.elem);
|
||||
}
|
||||
} else if (cmdType === ChangeElementCommand$1.type()) {
|
||||
|
@ -14428,10 +14429,8 @@ function SvgCanvas(container, config) {
|
|||
|
||||
call('selected', selectedElements);
|
||||
|
||||
if (showGrips || selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(true);
|
||||
} else {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(false);
|
||||
if (selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips);
|
||||
} // make sure the elements are in the correct order
|
||||
// See: https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
|
||||
|
||||
|
@ -16945,12 +16944,7 @@ function SvgCanvas(container, config) {
|
|||
|
||||
var dblClick = function dblClick(evt) {
|
||||
var evtTarget = evt.target;
|
||||
var parent = evtTarget.parentNode; // Do nothing if already in current group
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = evtTarget.parentNode;
|
||||
var mouseTarget = getMouseTarget(evt);
|
||||
var _mouseTarget = mouseTarget,
|
||||
tagName = _mouseTarget.tagName;
|
||||
|
@ -16958,6 +16952,11 @@ function SvgCanvas(container, config) {
|
|||
if (tagName === 'text' && currentMode !== 'textedit') {
|
||||
var pt = transformPoint(evt.pageX, evt.pageY, rootSctm);
|
||||
textActions.select(mouseTarget, pt.x, pt.y);
|
||||
} // Do nothing if already in current group
|
||||
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((tagName === 'g' || tagName === 'a') && getRotationAngle(mouseTarget)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4123,7 +4123,7 @@
|
|||
}
|
||||
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
|
||||
|
@ -4200,7 +4200,7 @@
|
|||
|
||||
removeElementFromListMap(this.elem);
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
|
||||
|
@ -10256,7 +10256,8 @@
|
|||
}, {
|
||||
key: "removeGroup",
|
||||
value: function removeGroup() {
|
||||
var group = this.group_.remove();
|
||||
var group = this.group_;
|
||||
this.group_.remove();
|
||||
this.group_ = undefined;
|
||||
return group;
|
||||
}
|
||||
|
@ -14229,7 +14230,7 @@
|
|||
restoreRefElems(cmd.elem);
|
||||
}
|
||||
|
||||
if (cmd.elem.tagName === 'use') {
|
||||
if (cmd.elem && cmd.elem.tagName === 'use') {
|
||||
setUseData(cmd.elem);
|
||||
}
|
||||
} else if (cmdType === ChangeElementCommand$1.type()) {
|
||||
|
@ -14434,10 +14435,8 @@
|
|||
|
||||
call('selected', selectedElements);
|
||||
|
||||
if (showGrips || selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(true);
|
||||
} else {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(false);
|
||||
if (selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips);
|
||||
} // make sure the elements are in the correct order
|
||||
// See: https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
|
||||
|
||||
|
@ -16951,12 +16950,7 @@
|
|||
|
||||
var dblClick = function dblClick(evt) {
|
||||
var evtTarget = evt.target;
|
||||
var parent = evtTarget.parentNode; // Do nothing if already in current group
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = evtTarget.parentNode;
|
||||
var mouseTarget = getMouseTarget(evt);
|
||||
var _mouseTarget = mouseTarget,
|
||||
tagName = _mouseTarget.tagName;
|
||||
|
@ -16964,6 +16958,11 @@
|
|||
if (tagName === 'text' && currentMode !== 'textedit') {
|
||||
var pt = transformPoint(evt.pageX, evt.pageY, rootSctm);
|
||||
textActions.select(mouseTarget, pt.x, pt.y);
|
||||
} // Do nothing if already in current group
|
||||
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((tagName === 'g' || tagName === 'a') && getRotationAngle(mouseTarget)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4189,7 +4189,7 @@ var SvgCanvas = (function () {
|
|||
}
|
||||
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
|
||||
|
@ -4266,7 +4266,7 @@ var SvgCanvas = (function () {
|
|||
|
||||
removeElementFromListMap(this.elem);
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
|
||||
|
@ -9730,7 +9730,8 @@ var SvgCanvas = (function () {
|
|||
}, {
|
||||
key: "removeGroup",
|
||||
value: function removeGroup() {
|
||||
var group = this.group_.remove();
|
||||
var group = this.group_;
|
||||
this.group_.remove();
|
||||
this.group_ = undefined;
|
||||
return group;
|
||||
}
|
||||
|
@ -13913,7 +13914,7 @@ var SvgCanvas = (function () {
|
|||
restoreRefElems(cmd.elem);
|
||||
}
|
||||
|
||||
if (cmd.elem.tagName === 'use') {
|
||||
if (cmd.elem && cmd.elem.tagName === 'use') {
|
||||
setUseData(cmd.elem);
|
||||
}
|
||||
} else if (cmdType === ChangeElementCommand$1.type()) {
|
||||
|
@ -14118,10 +14119,8 @@ var SvgCanvas = (function () {
|
|||
|
||||
call('selected', selectedElements);
|
||||
|
||||
if (showGrips || selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(true);
|
||||
} else {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(false);
|
||||
if (selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips);
|
||||
} // make sure the elements are in the correct order
|
||||
// See: https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
|
||||
|
||||
|
@ -16635,12 +16634,7 @@ var SvgCanvas = (function () {
|
|||
|
||||
var dblClick = function dblClick(evt) {
|
||||
var evtTarget = evt.target;
|
||||
var parent = evtTarget.parentNode; // Do nothing if already in current group
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = evtTarget.parentNode;
|
||||
var mouseTarget = getMouseTarget(evt);
|
||||
var _mouseTarget = mouseTarget,
|
||||
tagName = _mouseTarget.tagName;
|
||||
|
@ -16648,6 +16642,11 @@ var SvgCanvas = (function () {
|
|||
if (tagName === 'text' && currentMode !== 'textedit') {
|
||||
var pt = transformPoint(evt.pageX, evt.pageY, rootSctm);
|
||||
textActions.select(mouseTarget, pt.x, pt.y);
|
||||
} // Do nothing if already in current group
|
||||
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((tagName === 'g' || tagName === 'a') && getRotationAngle(mouseTarget)) {
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -4120,7 +4120,7 @@
|
|||
}
|
||||
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
|
||||
|
@ -4197,7 +4197,7 @@
|
|||
|
||||
removeElementFromListMap(this.elem);
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
|
||||
|
@ -10253,7 +10253,8 @@
|
|||
}, {
|
||||
key: "removeGroup",
|
||||
value: function removeGroup() {
|
||||
var group = this.group_.remove();
|
||||
var group = this.group_;
|
||||
this.group_.remove();
|
||||
this.group_ = undefined;
|
||||
return group;
|
||||
}
|
||||
|
@ -14226,7 +14227,7 @@
|
|||
restoreRefElems(cmd.elem);
|
||||
}
|
||||
|
||||
if (cmd.elem.tagName === 'use') {
|
||||
if (cmd.elem && cmd.elem.tagName === 'use') {
|
||||
setUseData(cmd.elem);
|
||||
}
|
||||
} else if (cmdType === ChangeElementCommand$1.type()) {
|
||||
|
@ -14431,10 +14432,8 @@
|
|||
|
||||
call('selected', selectedElements);
|
||||
|
||||
if (showGrips || selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(true);
|
||||
} else {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(false);
|
||||
if (selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips);
|
||||
} // make sure the elements are in the correct order
|
||||
// See: https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
|
||||
|
||||
|
@ -16948,12 +16947,7 @@
|
|||
|
||||
var dblClick = function dblClick(evt) {
|
||||
var evtTarget = evt.target;
|
||||
var parent = evtTarget.parentNode; // Do nothing if already in current group
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = evtTarget.parentNode;
|
||||
var mouseTarget = getMouseTarget(evt);
|
||||
var _mouseTarget = mouseTarget,
|
||||
tagName = _mouseTarget.tagName;
|
||||
|
@ -16961,6 +16955,11 @@
|
|||
if (tagName === 'text' && currentMode !== 'textedit') {
|
||||
var pt = transformPoint(evt.pageX, evt.pageY, rootSctm);
|
||||
textActions.select(mouseTarget, pt.x, pt.y);
|
||||
} // Do nothing if already in current group
|
||||
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((tagName === 'g' || tagName === 'a') && getRotationAngle(mouseTarget)) {
|
||||
|
|
|
@ -4120,7 +4120,7 @@
|
|||
}
|
||||
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_UNAPPLY, this);
|
||||
|
@ -4197,7 +4197,7 @@
|
|||
|
||||
removeElementFromListMap(this.elem);
|
||||
this.parent = this.elem.parentNode;
|
||||
this.elem = this.elem.remove();
|
||||
this.elem.remove();
|
||||
|
||||
if (handler) {
|
||||
handler.handleHistoryEvent(HistoryEventTypes.AFTER_APPLY, this);
|
||||
|
@ -10253,7 +10253,8 @@
|
|||
}, {
|
||||
key: "removeGroup",
|
||||
value: function removeGroup() {
|
||||
var group = this.group_.remove();
|
||||
var group = this.group_;
|
||||
this.group_.remove();
|
||||
this.group_ = undefined;
|
||||
return group;
|
||||
}
|
||||
|
@ -14226,7 +14227,7 @@
|
|||
restoreRefElems(cmd.elem);
|
||||
}
|
||||
|
||||
if (cmd.elem.tagName === 'use') {
|
||||
if (cmd.elem && cmd.elem.tagName === 'use') {
|
||||
setUseData(cmd.elem);
|
||||
}
|
||||
} else if (cmdType === ChangeElementCommand$1.type()) {
|
||||
|
@ -14431,10 +14432,8 @@
|
|||
|
||||
call('selected', selectedElements);
|
||||
|
||||
if (showGrips || selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(true);
|
||||
} else {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(false);
|
||||
if (selectedElements.length === 1) {
|
||||
selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips);
|
||||
} // make sure the elements are in the correct order
|
||||
// See: https://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-compareDocumentPosition
|
||||
|
||||
|
@ -16948,12 +16947,7 @@
|
|||
|
||||
var dblClick = function dblClick(evt) {
|
||||
var evtTarget = evt.target;
|
||||
var parent = evtTarget.parentNode; // Do nothing if already in current group
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
var parent = evtTarget.parentNode;
|
||||
var mouseTarget = getMouseTarget(evt);
|
||||
var _mouseTarget = mouseTarget,
|
||||
tagName = _mouseTarget.tagName;
|
||||
|
@ -16961,6 +16955,11 @@
|
|||
if (tagName === 'text' && currentMode !== 'textedit') {
|
||||
var pt = transformPoint(evt.pageX, evt.pageY, rootSctm);
|
||||
textActions.select(mouseTarget, pt.x, pt.y);
|
||||
} // Do nothing if already in current group
|
||||
|
||||
|
||||
if (parent === currentGroup) {
|
||||
return;
|
||||
}
|
||||
|
||||
if ((tagName === 'g' || tagName === 'a') && getRotationAngle(mouseTarget)) {
|
||||
|
|
Loading…
Reference in New Issue