* #91 clickSelect issue fixed * #90 image src set issue fixed * #91 svgcanvas undefined issue fixed * #91 console removed and each changes * #91 $.each changes * #91 $.each changes * #91 forech change to Object.entries * #91 each and entries changes * #91 jquery extend changes * #91 extend modification changes
This commit is contained in:
@@ -215,7 +215,7 @@ export default {
|
||||
const mtypes = ['start', 'mid', 'end'];
|
||||
const defs = svgCanvas.findDefs();
|
||||
|
||||
$.each(mtypes, function (i, type) {
|
||||
mtypes.forEach(function(type, i){
|
||||
const marker = getLinked(elem, 'marker-' + type);
|
||||
if (!marker) { return; }
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export default {
|
||||
async init(S) {
|
||||
const svgEditor = this;
|
||||
const { svgCanvas } = svgEditor;
|
||||
const { getElem, $id } = svgCanvas;
|
||||
const { getElem, $id, mergeDeep } = svgCanvas;
|
||||
const { $, svgroot } = S,
|
||||
addElem = svgCanvas.addSVGElementFromJson,
|
||||
selManager = S.selectorManager;
|
||||
@@ -51,7 +51,7 @@ export default {
|
||||
const getBBintersect = (x, y, bb, offset) => {
|
||||
if (offset) {
|
||||
offset -= 0;
|
||||
bb = $.extend({}, bb);
|
||||
bb = mergeDeep({}, bb);
|
||||
bb.width += offset;
|
||||
bb.height += offset;
|
||||
bb.x -= offset / 2;
|
||||
|
||||
@@ -28,7 +28,7 @@ export default {
|
||||
const { $id } = svgEditor.svgCanvas;
|
||||
const imagelibStrings = await loadExtensionTranslation(svgEditor.configObj.pref('lang'));
|
||||
|
||||
const { uiStrings, canvas: svgCanvas } = svgEditor;
|
||||
const { uiStrings, svgCanvas } = svgEditor;
|
||||
|
||||
const allowedImageLibOrigins = imagelibStrings.imgLibs.map(({ url }) => {
|
||||
try {
|
||||
@@ -332,9 +332,9 @@ export default {
|
||||
}
|
||||
|
||||
const toggleMultiLoop = () => {
|
||||
$.each(multiArr, function (i) {
|
||||
const type = this[0];
|
||||
const data = this[1];
|
||||
multiArr.forEach(function(item, i){
|
||||
const type = item[0];
|
||||
const data = item[1];
|
||||
if (type === 'svg') {
|
||||
svgCanvas.importSvgString(data);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user