From 8e54c156382d040ebad032339937f6c38ff45aac Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 30 May 2021 16:49:53 +0200 Subject: [PATCH 1/5] review eslint rule --- .eslintrc.js | 5 +++-- src/common/namespaces.js | 2 +- src/editor/ConfigObj.js | 2 +- .../extensions/ext-foreignobject/ext-foreignobject.js | 2 +- src/editor/extensions/ext-imagelib/locale/de.js | 2 +- src/editor/extensions/ext-imagelib/locale/en.js | 2 +- src/editor/extensions/ext-imagelib/locale/fr.js | 2 +- src/editor/extensions/ext-imagelib/locale/pl.js | 2 +- src/editor/extensions/ext-imagelib/locale/pt-BR.js | 2 +- src/editor/extensions/ext-imagelib/locale/ro.js | 2 +- src/editor/extensions/ext-imagelib/locale/sk.js | 2 +- src/editor/extensions/ext-imagelib/locale/sl.js | 2 +- src/editor/extensions/ext-imagelib/locale/zh-CN.js | 2 +- src/editor/locale.js | 2 +- src/editor/locale/lang.af.js | 8 ++++---- src/editor/locale/lang.ar.js | 8 ++++---- src/editor/locale/lang.az.js | 8 ++++---- src/editor/locale/lang.be.js | 8 ++++---- src/editor/locale/lang.bg.js | 8 ++++---- src/editor/locale/lang.ca.js | 8 ++++---- src/editor/locale/lang.cs.js | 8 ++++---- src/editor/locale/lang.cy.js | 8 ++++---- src/editor/locale/lang.da.js | 8 ++++---- src/editor/locale/lang.de.js | 8 ++++---- src/editor/locale/lang.el.js | 8 ++++---- src/editor/locale/lang.en.js | 8 ++++---- src/editor/locale/lang.es.js | 8 ++++---- src/editor/locale/lang.et.js | 8 ++++---- src/editor/locale/lang.fa.js | 8 ++++---- src/editor/locale/lang.fi.js | 8 ++++---- src/editor/locale/lang.fr.js | 8 ++++---- src/editor/locale/lang.fy.js | 8 ++++---- src/editor/locale/lang.ga.js | 8 ++++---- src/editor/locale/lang.gl.js | 8 ++++---- src/editor/locale/lang.he.js | 8 ++++---- src/editor/locale/lang.hi.js | 8 ++++---- src/editor/locale/lang.hr.js | 8 ++++---- src/editor/locale/lang.hu.js | 8 ++++---- src/editor/locale/lang.hy.js | 8 ++++---- src/editor/locale/lang.id.js | 8 ++++---- src/editor/locale/lang.is.js | 8 ++++---- src/editor/locale/lang.it.js | 8 ++++---- src/editor/locale/lang.ja.js | 8 ++++---- src/editor/locale/lang.ko.js | 8 ++++---- src/editor/locale/lang.lt.js | 8 ++++---- src/editor/locale/lang.lv.js | 8 ++++---- src/editor/locale/lang.mk.js | 8 ++++---- src/editor/locale/lang.ms.js | 8 ++++---- src/editor/locale/lang.mt.js | 8 ++++---- src/editor/locale/lang.nl.js | 8 ++++---- src/editor/locale/lang.no.js | 8 ++++---- src/editor/locale/lang.pl.js | 8 ++++---- src/editor/locale/lang.pt-BR.js | 8 ++++---- src/editor/locale/lang.pt-PT.js | 8 ++++---- src/editor/locale/lang.ro.js | 8 ++++---- src/editor/locale/lang.ru.js | 8 ++++---- src/editor/locale/lang.sk.js | 8 ++++---- src/editor/locale/lang.sl.js | 8 ++++---- src/editor/locale/lang.sq.js | 8 ++++---- src/editor/locale/lang.sr.js | 8 ++++---- src/editor/locale/lang.sv.js | 8 ++++---- src/editor/locale/lang.sw.js | 8 ++++---- src/editor/locale/lang.test.js | 8 ++++---- src/editor/locale/lang.th.js | 8 ++++---- src/editor/locale/lang.tl.js | 8 ++++---- src/editor/locale/lang.tr.js | 8 ++++---- src/editor/locale/lang.uk.js | 8 ++++---- src/editor/locale/lang.vi.js | 8 ++++---- src/editor/locale/lang.yi.js | 8 ++++---- src/editor/locale/lang.zh-CN.js | 8 ++++---- src/editor/locale/lang.zh-HK.js | 8 ++++---- src/editor/locale/lang.zh-TW.js | 8 ++++---- src/svgcanvas/elem-get-set.js | 4 ++-- src/svgcanvas/recalculate.js | 2 +- src/svgcanvas/selected-elem.js | 4 ++-- 75 files changed, 253 insertions(+), 252 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index cd21aa9f..1819e570 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,6 +32,7 @@ module.exports = { /** @todo cognitive complexity should be much lower (25-50?) */ "sonarjs/cognitive-complexity": [ "warn", 200 ], /** @todo no param reassign creates too many warnings but should be a warning */ + "comma-dangle": [ "error" ], "no-param-reassign": "off", "node/no-unsupported-features/es-syntax": 0, "no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ], @@ -45,7 +46,7 @@ module.exports = { "warn", { "allow": [ "warn", "error", "info", "table" ] } ], - "arrow-parens": [ "error", "always" ], + "arrow-parens": [ "error", "always" ] }, overrides: [ { @@ -84,7 +85,7 @@ module.exports = { { files: [ 'src/editor/locale/*.js' ], rules: { // lang files may have long length - "max-len": "off", + "max-len": "off" } } ] diff --git a/src/common/namespaces.js b/src/common/namespaces.js index d3817bdb..3771691a 100644 --- a/src/common/namespaces.js +++ b/src/common/namespaces.js @@ -18,7 +18,7 @@ export const NS = { XLINK: 'http://www.w3.org/1999/xlink', OI: 'http://www.optimistik.fr/namespace/svg/OIdata', XML: 'http://www.w3.org/XML/1998/namespace', - XMLNS: 'http://www.w3.org/2000/xmlns/', // see http://www.w3.org/TR/REC-xml-names/#xmlReserved + XMLNS: 'http://www.w3.org/2000/xmlns/' // see http://www.w3.org/TR/REC-xml-names/#xmlReserved // SODIPODI: 'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd', // INKSCAPE: 'http://www.inkscape.org/namespaces/inkscape', // RDF: 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', diff --git a/src/editor/ConfigObj.js b/src/editor/ConfigObj.js index f49a7ac8..c36b84ff 100644 --- a/src/editor/ConfigObj.js +++ b/src/editor/ConfigObj.js @@ -184,7 +184,7 @@ export default class ConfigObj { 'ext-shapes', 'ext-polystar', 'ext-storage', - 'ext-opensave', + 'ext-opensave' // 'ext-helloworld', ]; this.curConfig = { diff --git a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js index 2a416463..9dd7a5b8 100644 --- a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js +++ b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js @@ -276,7 +276,7 @@ export default { } const attrs = { width: newFO.getAttribute('width'), - height: newFO.getAttribute('height'), + height: newFO.getAttribute('height') }; const keep = (attrs.width !== '0' || attrs.height !== '0'); svgCanvas.addToSelection([ newFO ], true); diff --git a/src/editor/extensions/ext-imagelib/locale/de.js b/src/editor/extensions/ext-imagelib/locale/de.js index 7e06169e..611441e4 100644 --- a/src/editor/extensions/ext-imagelib/locale/de.js +++ b/src/editor/extensions/ext-imagelib/locale/de.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/en.js b/src/editor/extensions/ext-imagelib/locale/en.js index acbae4ef..2ed15479 100644 --- a/src/editor/extensions/ext-imagelib/locale/en.js +++ b/src/editor/extensions/ext-imagelib/locale/en.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/fr.js b/src/editor/extensions/ext-imagelib/locale/fr.js index d3197f61..a2801f11 100644 --- a/src/editor/extensions/ext-imagelib/locale/fr.js +++ b/src/editor/extensions/ext-imagelib/locale/fr.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/pl.js b/src/editor/extensions/ext-imagelib/locale/pl.js index a040f5f7..25e850ac 100644 --- a/src/editor/extensions/ext-imagelib/locale/pl.js +++ b/src/editor/extensions/ext-imagelib/locale/pl.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/pt-BR.js b/src/editor/extensions/ext-imagelib/locale/pt-BR.js index d3ea77e0..70e326a8 100644 --- a/src/editor/extensions/ext-imagelib/locale/pt-BR.js +++ b/src/editor/extensions/ext-imagelib/locale/pt-BR.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/ro.js b/src/editor/extensions/ext-imagelib/locale/ro.js index ecdb68bc..4e9412ff 100644 --- a/src/editor/extensions/ext-imagelib/locale/ro.js +++ b/src/editor/extensions/ext-imagelib/locale/ro.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/sk.js b/src/editor/extensions/ext-imagelib/locale/sk.js index 30db7c6a..18c4dfd2 100644 --- a/src/editor/extensions/ext-imagelib/locale/sk.js +++ b/src/editor/extensions/ext-imagelib/locale/sk.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/sl.js b/src/editor/extensions/ext-imagelib/locale/sl.js index 6422b3f4..c19c481e 100644 --- a/src/editor/extensions/ext-imagelib/locale/sl.js +++ b/src/editor/extensions/ext-imagelib/locale/sl.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/extensions/ext-imagelib/locale/zh-CN.js b/src/editor/extensions/ext-imagelib/locale/zh-CN.js index add2dfdf..706f14ad 100644 --- a/src/editor/extensions/ext-imagelib/locale/zh-CN.js +++ b/src/editor/extensions/ext-imagelib/locale/zh-CN.js @@ -12,5 +12,5 @@ export default { imgLibs_0_name: 'Demo library (local)', imgLibs_0_description: 'Demonstration library for SVG-edit on this server', imgLibs_1_name: 'IAN Symbol Libraries', - imgLibs_1_description: 'Free library of illustrations', + imgLibs_1_description: 'Free library of illustrations' }; diff --git a/src/editor/locale.js b/src/editor/locale.js index 499cb35e..7be840a4 100644 --- a/src/editor/locale.js +++ b/src/editor/locale.js @@ -79,7 +79,7 @@ export const putLocale = async function (givenParam, goodLangs) { debug: false, resources: { [langParam]: { - translation: module.default, + translation: module.default } } }); diff --git a/src/editor/locale/lang.af.js b/src/editor/locale/lang.af.js index 4b9a59d9..193b6dd6 100644 --- a/src/editor/locale/lang.af.js +++ b/src/editor/locale/lang.af.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.ar.js b/src/editor/locale/lang.ar.js index a9d194c3..8a119231 100644 --- a/src/editor/locale/lang.ar.js +++ b/src/editor/locale/lang.ar.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.az.js b/src/editor/locale/lang.az.js index 3f763356..81f93c03 100644 --- a/src/editor/locale/lang.az.js +++ b/src/editor/locale/lang.az.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.be.js b/src/editor/locale/lang.be.js index 44162c2b..53108ac9 100644 --- a/src/editor/locale/lang.be.js +++ b/src/editor/locale/lang.be.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.bg.js b/src/editor/locale/lang.bg.js index 8af24096..a75cccc8 100644 --- a/src/editor/locale/lang.bg.js +++ b/src/editor/locale/lang.bg.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.ca.js b/src/editor/locale/lang.ca.js index 2bb823fa..7d1406b1 100644 --- a/src/editor/locale/lang.ca.js +++ b/src/editor/locale/lang.ca.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.cs.js b/src/editor/locale/lang.cs.js index 42da7ccb..37546607 100644 --- a/src/editor/locale/lang.cs.js +++ b/src/editor/locale/lang.cs.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Změnit ID elementu', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Hlavní menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Vrstva', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Nevhodná hodnota', diff --git a/src/editor/locale/lang.cy.js b/src/editor/locale/lang.cy.js index 7abefd06..b5978103 100644 --- a/src/editor/locale/lang.cy.js +++ b/src/editor/locale/lang.cy.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.da.js b/src/editor/locale/lang.da.js index cf7897b5..1326e6b1 100644 --- a/src/editor/locale/lang.da.js +++ b/src/editor/locale/lang.da.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -265,7 +265,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.de.js b/src/editor/locale/lang.de.js index 786fdb9b..bea62275 100644 --- a/src/editor/locale/lang.de.js +++ b/src/editor/locale/lang.de.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Element identifizieren', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Hauptmenü', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Ebene', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Fehlerhafter Wert', diff --git a/src/editor/locale/lang.el.js b/src/editor/locale/lang.el.js index 30fc794e..f1c0ac36 100644 --- a/src/editor/locale/lang.el.js +++ b/src/editor/locale/lang.el.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.en.js b/src/editor/locale/lang.en.js index 41f835e4..c55b8f06 100644 --- a/src/editor/locale/lang.en.js +++ b/src/editor/locale/lang.en.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.es.js b/src/editor/locale/lang.es.js index c3ad6565..b7f9dd58 100644 --- a/src/editor/locale/lang.es.js +++ b/src/editor/locale/lang.es.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menú principal', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Capa', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Valor no válido', diff --git a/src/editor/locale/lang.et.js b/src/editor/locale/lang.et.js index 6dcaeffa..33c31e29 100644 --- a/src/editor/locale/lang.et.js +++ b/src/editor/locale/lang.et.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.fa.js b/src/editor/locale/lang.fa.js index ad50ee2d..84bee637 100644 --- a/src/editor/locale/lang.fa.js +++ b/src/editor/locale/lang.fa.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: '‫لایه‬', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: '‫مقدار داده شده نامعتبر است‬', diff --git a/src/editor/locale/lang.fi.js b/src/editor/locale/lang.fi.js index 60b588c9..c869c8c8 100644 --- a/src/editor/locale/lang.fi.js +++ b/src/editor/locale/lang.fi.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.fr.js b/src/editor/locale/lang.fr.js index 2702edb8..707ddbae 100644 --- a/src/editor/locale/lang.fr.js +++ b/src/editor/locale/lang.fr.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: "Identifier l'élément", @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menu principal', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Calque', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Valeur fournie invalide', diff --git a/src/editor/locale/lang.fy.js b/src/editor/locale/lang.fy.js index e530861e..0961f698 100644 --- a/src/editor/locale/lang.fy.js +++ b/src/editor/locale/lang.fy.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Laach', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Ferkearde waarde jûn', diff --git a/src/editor/locale/lang.ga.js b/src/editor/locale/lang.ga.js index 8d6c9886..af50faf3 100644 --- a/src/editor/locale/lang.ga.js +++ b/src/editor/locale/lang.ga.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.gl.js b/src/editor/locale/lang.gl.js index dbcc47d6..8c9542ab 100644 --- a/src/editor/locale/lang.gl.js +++ b/src/editor/locale/lang.gl.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.he.js b/src/editor/locale/lang.he.js index 7ab5539f..bd232550 100755 --- a/src/editor/locale/lang.he.js +++ b/src/editor/locale/lang.he.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.hi.js b/src/editor/locale/lang.hi.js index ebc94e61..970e8165 100644 --- a/src/editor/locale/lang.hi.js +++ b/src/editor/locale/lang.hi.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'परत', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'अमान्य मूल्य', diff --git a/src/editor/locale/lang.hr.js b/src/editor/locale/lang.hr.js index d0798dda..52127d77 100644 --- a/src/editor/locale/lang.hr.js +++ b/src/editor/locale/lang.hr.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.hu.js b/src/editor/locale/lang.hu.js index 43bd5f52..28af52a4 100644 --- a/src/editor/locale/lang.hu.js +++ b/src/editor/locale/lang.hu.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.hy.js b/src/editor/locale/lang.hy.js index c916dd39..25ad35ff 100644 --- a/src/editor/locale/lang.hy.js +++ b/src/editor/locale/lang.hy.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.id.js b/src/editor/locale/lang.id.js index a0a2dca5..14824300 100644 --- a/src/editor/locale/lang.id.js +++ b/src/editor/locale/lang.id.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.is.js b/src/editor/locale/lang.is.js index 0f2634c2..f95ed9b6 100644 --- a/src/editor/locale/lang.is.js +++ b/src/editor/locale/lang.is.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.it.js b/src/editor/locale/lang.it.js index f2127235..935ad40f 100644 --- a/src/editor/locale/lang.it.js +++ b/src/editor/locale/lang.it.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: "Identifica l'elemento", @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menù principale', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Livello', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Valore assegnato non valido', diff --git a/src/editor/locale/lang.ja.js b/src/editor/locale/lang.ja.js index e8cf87b5..0b2fa93e 100644 --- a/src/editor/locale/lang.ja.js +++ b/src/editor/locale/lang.ja.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'レイヤ', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: '無効な値が指定されています。', diff --git a/src/editor/locale/lang.ko.js b/src/editor/locale/lang.ko.js index 0362216a..7ec90eda 100644 --- a/src/editor/locale/lang.ko.js +++ b/src/editor/locale/lang.ko.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.lt.js b/src/editor/locale/lang.lt.js index f83ccc3e..9d00e1c4 100644 --- a/src/editor/locale/lang.lt.js +++ b/src/editor/locale/lang.lt.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.lv.js b/src/editor/locale/lang.lv.js index d119baff..98326ad5 100644 --- a/src/editor/locale/lang.lv.js +++ b/src/editor/locale/lang.lv.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.mk.js b/src/editor/locale/lang.mk.js index 4b11aa11..7b01fda7 100644 --- a/src/editor/locale/lang.mk.js +++ b/src/editor/locale/lang.mk.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.ms.js b/src/editor/locale/lang.ms.js index 0fdefcae..edcc1cb1 100644 --- a/src/editor/locale/lang.ms.js +++ b/src/editor/locale/lang.ms.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.mt.js b/src/editor/locale/lang.mt.js index b5eecfed..ca42a62d 100644 --- a/src/editor/locale/lang.mt.js +++ b/src/editor/locale/lang.mt.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.nl.js b/src/editor/locale/lang.nl.js index f7e50d5a..55a0dbbc 100644 --- a/src/editor/locale/lang.nl.js +++ b/src/editor/locale/lang.nl.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identificeer het element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Hoofdmenu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Laag', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Verkeerde waarde gegeven', diff --git a/src/editor/locale/lang.no.js b/src/editor/locale/lang.no.js index b6dc30d5..ae97a826 100644 --- a/src/editor/locale/lang.no.js +++ b/src/editor/locale/lang.no.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.pl.js b/src/editor/locale/lang.pl.js index 06036461..f46af988 100644 --- a/src/editor/locale/lang.pl.js +++ b/src/editor/locale/lang.pl.js @@ -28,7 +28,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identyfikator elementu', @@ -91,7 +91,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menu główne', @@ -170,7 +170,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Warstwa', @@ -263,7 +263,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Podano nieprawidłową wartość', diff --git a/src/editor/locale/lang.pt-BR.js b/src/editor/locale/lang.pt-BR.js index 4a2c07a2..f62a54d9 100644 --- a/src/editor/locale/lang.pt-BR.js +++ b/src/editor/locale/lang.pt-BR.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identifica o elemento', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menu Principal', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Camada', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Valor inválido', diff --git a/src/editor/locale/lang.pt-PT.js b/src/editor/locale/lang.pt-PT.js index 6c99bc1b..414e69a0 100644 --- a/src/editor/locale/lang.pt-PT.js +++ b/src/editor/locale/lang.pt-PT.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.ro.js b/src/editor/locale/lang.ro.js index 15cabbaa..d0d85fe3 100644 --- a/src/editor/locale/lang.ro.js +++ b/src/editor/locale/lang.ro.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identificare element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Menu Principal', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Strat', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Valoarea data nu este validă', diff --git a/src/editor/locale/lang.ru.js b/src/editor/locale/lang.ru.js index 9e3232cd..757a221f 100644 --- a/src/editor/locale/lang.ru.js +++ b/src/editor/locale/lang.ru.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Идентификатор элемента', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Главное меню', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Слой', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Некорректное значение аргумента', diff --git a/src/editor/locale/lang.sk.js b/src/editor/locale/lang.sk.js index 92c7e9be..dc684861 100644 --- a/src/editor/locale/lang.sk.js +++ b/src/editor/locale/lang.sk.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Zmeniť ID elementu', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Hlavné menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Vrstva', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Neplatná hodnota', diff --git a/src/editor/locale/lang.sl.js b/src/editor/locale/lang.sl.js index 4caa27e2..99966d06 100644 --- a/src/editor/locale/lang.sl.js +++ b/src/editor/locale/lang.sl.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'ID elementa', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Glavni meni', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Sloj', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Napačna vrednost!', diff --git a/src/editor/locale/lang.sq.js b/src/editor/locale/lang.sq.js index fccdf0c8..6a5772de 100644 --- a/src/editor/locale/lang.sq.js +++ b/src/editor/locale/lang.sq.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.sr.js b/src/editor/locale/lang.sr.js index 2669c818..ea8fd85b 100644 --- a/src/editor/locale/lang.sr.js +++ b/src/editor/locale/lang.sr.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.sv.js b/src/editor/locale/lang.sv.js index aefecec9..79b81adc 100644 --- a/src/editor/locale/lang.sv.js +++ b/src/editor/locale/lang.sv.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.sw.js b/src/editor/locale/lang.sw.js index 7e521899..f52f4556 100644 --- a/src/editor/locale/lang.sw.js +++ b/src/editor/locale/lang.sw.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.test.js b/src/editor/locale/lang.test.js index e90d66a7..d0aaa8e2 100644 --- a/src/editor/locale/lang.test.js +++ b/src/editor/locale/lang.test.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.th.js b/src/editor/locale/lang.th.js index 17577ede..e3016fd4 100644 --- a/src/editor/locale/lang.th.js +++ b/src/editor/locale/lang.th.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.tl.js b/src/editor/locale/lang.tl.js index 04fc8f19..20a6d51b 100644 --- a/src/editor/locale/lang.tl.js +++ b/src/editor/locale/lang.tl.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.tr.js b/src/editor/locale/lang.tr.js index eca47db1..d08e2c76 100644 --- a/src/editor/locale/lang.tr.js +++ b/src/editor/locale/lang.tr.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.uk.js b/src/editor/locale/lang.uk.js index 65c35268..b47fd586 100644 --- a/src/editor/locale/lang.uk.js +++ b/src/editor/locale/lang.uk.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.vi.js b/src/editor/locale/lang.vi.js index b78ca521..ec09f523 100644 --- a/src/editor/locale/lang.vi.js +++ b/src/editor/locale/lang.vi.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.yi.js b/src/editor/locale/lang.yi.js index 2d7b2e29..136b7f2d 100644 --- a/src/editor/locale/lang.yi.js +++ b/src/editor/locale/lang.yi.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.zh-CN.js b/src/editor/locale/lang.zh-CN.js index 0319ca5e..62f71bc0 100644 --- a/src/editor/locale/lang.zh-CN.js +++ b/src/editor/locale/lang.zh-CN.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: '元素ID', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: '主菜单', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: '图层', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: '无效的参数', diff --git a/src/editor/locale/lang.zh-HK.js b/src/editor/locale/lang.zh-HK.js index af96f324..5c4ccaa0 100644 --- a/src/editor/locale/lang.zh-HK.js +++ b/src/editor/locale/lang.zh-HK.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: 'Layer', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: 'Invalid value given', diff --git a/src/editor/locale/lang.zh-TW.js b/src/editor/locale/lang.zh-TW.js index 706fecff..4bb7ea7b 100644 --- a/src/editor/locale/lang.zh-TW.js +++ b/src/editor/locale/lang.zh-TW.js @@ -27,7 +27,7 @@ export default { pick_stroke_paint_opacity: 'Pick a Stroke Paint and Opacity', pick_fill_paint_opacity: 'Pick a Fill Paint and Opacity', group_identify_label: 'Group identification label', - export_type_label: 'Select an image type for export:', + export_type_label: 'Select an image type for export:' }, properties: { id: 'Identify the element', @@ -90,7 +90,7 @@ export default { no_prefs_or_content: 'Do not store my preferences or SVG content locally', jgraduate_pad: 'Pad', jgraduate_reflect: 'Reflect', - jgraduate_repeat: 'Repeat', + jgraduate_repeat: 'Repeat' }, tools: { main_menu: 'Main Menu', @@ -169,7 +169,7 @@ export default { ellipse_circle_tool: 'Ellipse/Circle Tool', square_rect_tool: 'Square/Rect Tool', remember_this_choice: 'Remember this choice?', - remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.', + remember_this_choice_title: 'If you choose to opt out of storage while remembering this choice, the URL will change so as to avoid asking again.' }, layers: { layer: '圖層', @@ -262,7 +262,7 @@ export default { jgraduate_set_angle: 'Click to set Angle', jgraduate_deg: 'deg:', jgraduate_opac: 'Opac:', - jgraduate_set_opac: 'Click to set Opac', + jgraduate_set_opac: 'Click to set Opac' }, notification: { invalidAttrValGiven: '數值給定錯誤', diff --git a/src/svgcanvas/elem-get-set.js b/src/svgcanvas/elem-get-set.js index 27c2b857..7c2284e7 100644 --- a/src/svgcanvas/elem-get-set.js +++ b/src/svgcanvas/elem-get-set.js @@ -747,7 +747,7 @@ export const setImageURLMethod = function (val) { const attrs = { width: elem.getAttribute('width'), - height: elem.getAttribute('height'), + height: elem.getAttribute('height') }; const setsize = (!attrs.width || !attrs.height); @@ -768,7 +768,7 @@ export const setImageURLMethod = function (val) { img.onload = function () { const changes = { width: elem.getAttribute('width'), - height: elem.getAttribute('height'), + height: elem.getAttribute('height') }; elem.setAttribute('width', this.width); elem.setAttribute('height', this.height); diff --git a/src/svgcanvas/recalculate.js b/src/svgcanvas/recalculate.js index ee2d509a..186fb447 100644 --- a/src/svgcanvas/recalculate.js +++ b/src/svgcanvas/recalculate.js @@ -707,7 +707,7 @@ export const recalculateDimensions = function (selected) { x1: selected.getAttribute('x1'), y1: selected.getAttribute('y1'), x2: selected.getAttribute('x2'), - y2: selected.getAttribute('y2'), + y2: selected.getAttribute('y2') }; // Fallthrough case 'polyline': diff --git a/src/svgcanvas/selected-elem.js b/src/svgcanvas/selected-elem.js index d39ffe24..0fe11266 100644 --- a/src/svgcanvas/selected-elem.js +++ b/src/svgcanvas/selected-elem.js @@ -535,7 +535,7 @@ export const pushGroupProperty = function (g, undoable) { const gattrs = { filter: g.getAttribute('filter'), - opacity: g.getAttribute('opacity'), + opacity: g.getAttribute('opacity') }; let gfilter; let gblur; let changes; const drawing = elementContext_.getDrawing(); @@ -719,7 +719,7 @@ export const convertToGroup = function (elem) { const svg = elem.firstChild; const pt = { x: svg.getAttribute('x'), - y: svg.getAttribute('y'), + y: svg.getAttribute('y') }; // $(elem.firstChild.firstChild).unwrap(); From d6a96d7fe89758134ac9f8efa051d4ab73cf93d8 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 30 May 2021 16:50:28 +0200 Subject: [PATCH 2/5] refactor --- src/svgcanvas/event.js | 266 ++++++++++++++++++-------------------- src/svgcanvas/svg-exec.js | 101 ++++++++------- 2 files changed, 175 insertions(+), 192 deletions(-) diff --git a/src/svgcanvas/event.js b/src/svgcanvas/event.js index 6240dc66..0b973c3e 100644 --- a/src/svgcanvas/event.js +++ b/src/svgcanvas/event.js @@ -17,9 +17,7 @@ import { import { getTransformList } from './svgtransformlist.js'; -import { - supportsNonScalingStroke, isWebkit -} from '../common/browser.js'; +import { supportsNonScalingStroke } from '../common/browser.js'; import * as draw from './draw.js'; import * as pathModule from './path.js'; import * as hstry from './history.js'; @@ -84,16 +82,25 @@ export const getBsplinePoint = function (t) { * @returns {void} */ export const mouseMoveEvent = function (evt) { - const selectedElements = eventContext_.getSelectedElements(); + const selectedElements = eventContext_.getSelectedElements; const currentZoom = eventContext_.getCurrentZoom(); + const svgRoot = eventContext_.getSVGRoot(); + const svgCanvas = eventContext_.getCanvas(); + if (!eventContext_.getStarted()) { return; } - if (evt.button === 1 || eventContext_.getCanvas().spaceKey) { return; } - - let i; let xya; let cx; let cy; let dx; let dy; let len; let angle; let box; - let selected = selectedElements[0]; - const - pt = transformPoint(evt.pageX, evt.pageY, eventContext_.getrootSctm()); + if (evt.button === 1 || svgCanvas.spaceKey) { return; } + let i; + let xya; + let cx; + let cy; + let dx; + let dy; + let len; + let angle; + let box; + let selected = selectedElements()[0]; + const pt = transformPoint(evt.pageX, evt.pageY, eventContext_.getrootSctm()); const mouseX = pt.x * currentZoom; const mouseY = pt.y * currentZoom; const shape = getElem(eventContext_.getId()); @@ -115,7 +122,7 @@ export const mouseMoveEvent = function (evt) { // we temporarily use a translate on the element(s) being dragged // this transform is removed upon mousing up and the element is // relocated to the new location - if (selectedElements[0] !== null) { + if (selectedElements()[0] !== null) { dx = x - eventContext_.getStartX(); dy = y - eventContext_.getStartY(); if (eventContext_.getCurConfig().gridSnapping) { @@ -124,9 +131,9 @@ export const mouseMoveEvent = function (evt) { } if (dx !== 0 || dy !== 0) { - len = selectedElements.length; + len = selectedElements().length; for (i = 0; i < len; ++i) { - selected = selectedElements[i]; + selected = selectedElements()[i]; if (isNullish(selected)) { break; } // if (i === 0) { // const box = utilsGetBBox(selected); @@ -136,7 +143,7 @@ export const mouseMoveEvent = function (evt) { // update the dummy transform in our transform list // to be a translate - const xform = eventContext_.getSVGRoot().createSVGTransform(); + const xform = svgRoot.createSVGTransform(); tlist = getTransformList(selected); // Note that if Webkit and there's no ID for this // element, the dummy transform may have gotten lost. @@ -150,10 +157,10 @@ export const mouseMoveEvent = function (evt) { } // update our internal bbox that we're tracking while dragging - eventContext_.getCanvas().selectorManager.requestSelector(selected).resize(); + svgCanvas.selectorManager.requestSelector(selected).resize(); } - eventContext_.getCanvas().call('transition', selectedElements); + svgCanvas.call('transition', selectedElements()); } } break; @@ -171,7 +178,7 @@ export const mouseMoveEvent = function (evt) { // - if newList contains selected, do nothing // - if newList doesn't contain selected, remove it from selected // - for any newList that was not in selectedElements, add it to selected - const elemsToRemove = selectedElements.slice(); const elemsToAdd = []; + const elemsToRemove = selectedElements().slice(); const elemsToAdd = []; const newList = eventContext_.getIntersectionList(); // For every element in the intersection, add if not present in selectedElements. @@ -179,7 +186,7 @@ export const mouseMoveEvent = function (evt) { for (i = 0; i < len; ++i) { const intElem = newList[i]; // Found an element that was not selected before, so we should add it. - if (!selectedElements.includes(intElem)) { + if (!selectedElements().includes(intElem)) { elemsToAdd.push(intElem); } // Found an element that was already selected, so we shouldn't remove it. @@ -190,11 +197,11 @@ export const mouseMoveEvent = function (evt) { } if (elemsToRemove.length > 0) { - eventContext_.getCanvas().removeFromSelection(elemsToRemove); + svgCanvas.removeFromSelection(elemsToRemove); } if (elemsToAdd.length > 0) { - eventContext_.getCanvas().addToSelection(elemsToAdd); + svgCanvas.addToSelection(elemsToAdd); } break; @@ -253,9 +260,9 @@ export const mouseMoveEvent = function (evt) { } // update the transform list with translate,scale,translate - const translateOrigin = eventContext_.getSVGRoot().createSVGTransform(); - const scale = eventContext_.getSVGRoot().createSVGTransform(); - const translateBack = eventContext_.getSVGRoot().createSVGTransform(); + const translateOrigin = svgRoot.createSVGTransform(); + const scale = svgRoot.createSVGTransform(); + const translateBack = svgRoot.createSVGTransform(); if (eventContext_.getCurConfig().gridSnapping) { left = snapToGrid(left); @@ -285,8 +292,8 @@ export const mouseMoveEvent = function (evt) { tlist.replaceItem(translateOrigin, N - 1); } - eventContext_.getCanvas().selectorManager.requestSelector(selected).resize(); - eventContext_.getCanvas().call('transition', selectedElements); + svgCanvas.selectorManager.requestSelector(selected).resize(); + svgCanvas.call('transition', selectedElements()); break; } case 'zoom': { @@ -462,7 +469,7 @@ export const mouseMoveEvent = function (evt) { height: Math.abs(realY - eventContext_.getRStartY() * currentZoom) }, 100); } - eventContext_.getCanvas().pathActions.mouseMove(x, y); + svgCanvas.pathActions.mouseMove(x, y); break; } case 'textedit': { @@ -477,7 +484,7 @@ export const mouseMoveEvent = function (evt) { // }, 100); // } - eventContext_.getCanvas().textActions.mouseMove(mouseX, mouseY); + svgCanvas.textActions.mouseMove(mouseX, mouseY); break; } case 'rotate': { @@ -497,8 +504,8 @@ export const mouseMoveEvent = function (evt) { angle = Math.round(angle / snap) * snap; } - eventContext_.getCanvas().setRotationAngle(angle < -180 ? (360 + angle) : angle, true); - eventContext_.getCanvas().call('transition', selectedElements); + svgCanvas.setRotationAngle(angle < -180 ? (360 + angle) : angle, true); + svgCanvas.call('transition', selectedElements()); break; } default: break; @@ -513,7 +520,7 @@ export const mouseMoveEvent = function (evt) { * @property {Float} mouse_y y coordinate on canvas * @property {Element} selected Refers to the first selected element */ - eventContext_.getCanvas().runExtensions('mouseMove', /** @type {module:svgcanvas.SvgCanvas#event:ext_mouseMove} */ { + svgCanvas.runExtensions('mouseMove', /** @type {module:svgcanvas.SvgCanvas#event:ext_mouseMove} */ { event: evt, mouse_x: mouseX, mouse_y: mouseY, @@ -537,6 +544,7 @@ export const mouseMoveEvent = function (evt) { export const mouseUpEvent = function (evt) { const selectedElements = eventContext_.getSelectedElements(); const currentZoom = eventContext_.getCurrentZoom(); + const svgCanvas = eventContext_.getCanvas(); if (evt.button === 2) { return; } const tempJustSelected = eventContext_.getJustSelected(); eventContext_.setJustSelected(null); @@ -594,13 +602,13 @@ export const mouseUpEvent = function (evt) { eventContext_.setCurText('font_size', selected.getAttribute('font-size')); eventContext_.setCurText('font_family', selected.getAttribute('font-family')); } - eventContext_.getCanvas().selectorManager.requestSelector(selected).showGrips(true); + svgCanvas.selectorManager.requestSelector(selected).showGrips(true); // This shouldn't be necessary as it was done on mouseDown... - // eventContext_.getCanvas().call('selected', [selected]); + // svgCanvas.call('selected', [selected]); } // always recalculate dimensions to strip off stray identity transforms - eventContext_.getCanvas().recalculateAllSelectedDimensions(); + svgCanvas.recalculateAllSelectedDimensions(); // if it was being dragged/resized if (realX !== eventContext_.getRStartX() || realY !== eventContext_.getRStartY()) { const len = selectedElements.length; @@ -608,18 +616,18 @@ export const mouseUpEvent = function (evt) { if (isNullish(selectedElements[i])) { break; } if (!selectedElements[i].firstChild) { // Not needed for groups (incorrectly resizes elems), possibly not needed at all? - eventContext_.getCanvas().selectorManager.requestSelector(selectedElements[i]).resize(); + svgCanvas.selectorManager.requestSelector(selectedElements[i]).resize(); } } // no change in position/size, so maybe we should move to pathedit } else { t = evt.target; if (selectedElements[0].nodeName === 'path' && isNullish(selectedElements[1])) { - eventContext_.getCanvas().pathActions.select(selectedElements[0]); + svgCanvas.pathActions.select(selectedElements[0]); // if it was a path // else, if it was selected and this is a shift-click, remove it from selection } else if (evt.shiftKey && tempJustSelected !== t) { - eventContext_.getCanvas().removeFromSelection([ t ]); + svgCanvas.removeFromSelection([ t ]); } } // no change in mouse position @@ -640,7 +648,7 @@ export const mouseUpEvent = function (evt) { eventContext_.getRubberBox().setAttribute('display', 'none'); } const factor = evt.shiftKey ? 0.5 : 2; - eventContext_.getCanvas().call('zoomed', { + svgCanvas.call('zoomed', { x: Math.min(eventContext_.getRStartX(), realX), y: Math.min(eventContext_.getRStartY(), realY), width: Math.abs(realX - eventContext_.getRStartX()), @@ -665,7 +673,7 @@ export const mouseUpEvent = function (evt) { const commaIndex = coords.indexOf(','); keep = commaIndex >= 0 ? coords.includes(',', commaIndex + 1) : coords.includes(' ', coords.indexOf(' ') + 1); if (keep) { - element = eventContext_.getCanvas().pathActions.smoothPolylineIntoPath(element); + element = svgCanvas.pathActions.smoothPolylineIntoPath(element); } break; } case 'line': { @@ -698,7 +706,7 @@ export const mouseUpEvent = function (evt) { case 'fhellipse': if ((eventContext_.getFreehand('maxx') - eventContext_.getFreehand('minx')) > 0 && (eventContext_.getFreehand('maxy') - eventContext_.getFreehand('miny')) > 0) { - element = eventContext_.getCanvas().addSVGElementFromJson({ + element = svgCanvas.addSVGElementFromJson({ element: 'ellipse', curStyles: true, attr: { @@ -709,14 +717,14 @@ export const mouseUpEvent = function (evt) { id: eventContext_.getId() } }); - eventContext_.getCanvas().call('changed', [ element ]); + svgCanvas.call('changed', [ element ]); keep = true; } break; case 'fhrect': if ((eventContext_.getFreehand('maxx') - eventContext_.getFreehand('minx')) > 0 && (eventContext_.getFreehand('maxy') - eventContext_.getFreehand('miny')) > 0) { - element = eventContext_.getCanvas().addSVGElementFromJson({ + element = svgCanvas.addSVGElementFromJson({ element: 'rect', curStyles: true, attr: { @@ -727,14 +735,14 @@ export const mouseUpEvent = function (evt) { id: eventContext_.getId() } }); - eventContext_.getCanvas().call('changed', [ element ]); + svgCanvas.call('changed', [ element ]); keep = true; } break; case 'text': keep = true; - eventContext_.getCanvas().selectOnly([ element ]); - eventContext_.getCanvas().textActions.start(element); + svgCanvas.selectOnly([ element ]); + svgCanvas.textActions.start(element); break; case 'path': { // set element to null here so that it is not removed nor finalized @@ -742,31 +750,31 @@ export const mouseUpEvent = function (evt) { // continue to be set to true so that mouseMove happens eventContext_.setStarted(true); - const res = eventContext_.getCanvas().pathActions.mouseUp(evt, element, mouseX, mouseY); + const res = svgCanvas.pathActions.mouseUp(evt, element, mouseX, mouseY); ({ element } = res); ({ keep } = res); break; } case 'pathedit': keep = true; element = null; - eventContext_.getCanvas().pathActions.mouseUp(evt); + svgCanvas.pathActions.mouseUp(evt); break; case 'textedit': keep = false; element = null; - eventContext_.getCanvas().textActions.mouseUp(evt, mouseX, mouseY); + svgCanvas.textActions.mouseUp(evt, mouseX, mouseY); break; case 'rotate': { keep = true; element = null; eventContext_.setCurrentMode('select'); - const batchCmd = eventContext_.getCanvas().undoMgr.finishUndoableChange(); + const batchCmd = svgCanvas.undoMgr.finishUndoableChange(); if (!batchCmd.isEmpty()) { eventContext_.addCommandToHistory(batchCmd); } // perform recalculation to weed out any stray identity transforms that might get stuck - eventContext_.getCanvas().recalculateAllSelectedDimensions(); - eventContext_.getCanvas().call('changed', selectedElements); + svgCanvas.recalculateAllSelectedDimensions(); + svgCanvas.call('changed', selectedElements); break; } default: // This could occur in an extension @@ -781,7 +789,7 @@ export const mouseUpEvent = function (evt) { * @property {Float} mouse_x x coordinate on canvas * @property {Float} mouse_y y coordinate on canvas */ - const extResult = eventContext_.getCanvas().runExtensions('mouseUp', { + const extResult = svgCanvas.runExtensions('mouseUp', { event: evt, mouse_x: mouseX, mouse_y: mouseY @@ -796,7 +804,7 @@ export const mouseUpEvent = function (evt) { }); if (!keep && !isNullish(element)) { - eventContext_.getCanvas().getCurrentDrawing().releaseId(eventContext_.getId()); + svgCanvas.getCurrentDrawing().releaseId(eventContext_.getId()); element.remove(); element = null; @@ -817,21 +825,21 @@ export const mouseUpEvent = function (evt) { t.id !== 'svgcanvas' && t.id !== 'svgroot' ) { // switch into "select" mode if we've clicked on an element - eventContext_.getCanvas().setMode('select'); - eventContext_.getCanvas().selectOnly([ t ], true); + svgCanvas.setMode('select'); + svgCanvas.selectOnly([ t ], true); } } else if (!isNullish(element)) { /** * @name module:svgcanvas.SvgCanvas#addedNew * @type {boolean} */ - eventContext_.getCanvas().addedNew = true; + svgCanvas.addedNew = true; if (useUnit) { convertAttrs(element); } let aniDur = 0.2; let cAni; - const curShape = eventContext_.getCanvas().getStyle(); + const curShape = svgCanvas.getStyle(); const opacAni = eventContext_.getOpacAni(); if (opacAni.beginElement && Number.parseFloat(element.getAttribute('opacity')) !== curShape.opacity) { cAni = opacAni.cloneNode(true); @@ -854,14 +862,14 @@ export const mouseUpEvent = function (evt) { element.setAttribute('style', 'pointer-events:inherit'); cleanupElement(element); if (eventContext_.getCurrentMode() === 'path') { - eventContext_.getCanvas().pathActions.toEditMode(element); + svgCanvas.pathActions.toEditMode(element); } else if (eventContext_.getCurConfig().selectNew) { - eventContext_.getCanvas().selectOnly([ element ], true); + svgCanvas.selectOnly([ element ], true); } // we create the insert command that is stored on the stack // undo means to call cmd.unapply(), redo means to call cmd.apply() eventContext_.addCommandToHistory(new InsertElementCommand(element)); - eventContext_.getCanvas().call('changed', [ element ]); + svgCanvas.call('changed', [ element ]); }, aniDur * 1000); } eventContext_.setStartTransform(null); @@ -871,13 +879,14 @@ export const dblClickEvent = function (evt) { const selectedElements = eventContext_.getSelectedElements(); const evtTarget = evt.target; const parent = evtTarget.parentNode; + const svgCanvas = eventContext_.getCanvas(); - let mouseTarget = eventContext_.getCanvas().getMouseTarget(evt); + let mouseTarget = svgCanvas.getMouseTarget(evt); const { tagName } = mouseTarget; if (tagName === 'text' && eventContext_.getCurrentMode() !== 'textedit') { const pt = transformPoint(evt.pageX, evt.pageY, eventContext_.getrootSctm()); - eventContext_.getCanvas().textActions.select(mouseTarget, pt.x, pt.y); + svgCanvas.textActions.select(mouseTarget, pt.x, pt.y); } // Do nothing if already in current group @@ -888,9 +897,9 @@ export const dblClickEvent = function (evt) { // this (similar to editing rotated paths) // Ungroup and regroup - eventContext_.getCanvas().pushGroupProperties(mouseTarget); + svgCanvas.pushGroupProperties(mouseTarget); mouseTarget = selectedElements[0]; - eventContext_.getCanvas().clearSelection(true); + svgCanvas.clearSelection(true); } // Reset context if (eventContext_.getCurrentGroup()) { @@ -898,8 +907,8 @@ export const dblClickEvent = function (evt) { } if ((parent.tagName !== 'g' && parent.tagName !== 'a') || - parent === eventContext_.getCanvas().getCurrentDrawing().getCurrentLayer() || - mouseTarget === eventContext_.getCanvas().selectorManager.selectorParentGroup + parent === svgCanvas.getCurrentDrawing().getCurrentLayer() || + mouseTarget === svgCanvas.selectorManager.selectorParentGroup ) { // Escape from in-group edit return; @@ -919,17 +928,19 @@ export const dblClickEvent = function (evt) { */ export const mouseDownEvent = function (evt) { const dataStorage = eventContext_.getDataStorage(); - const selectedElements = eventContext_.getSelectedElements(); + const selectedElements = eventContext_.getSelectedElements; const currentZoom = eventContext_.getCurrentZoom(); - const curShape = eventContext_.getCanvas().getStyle(); const svgCanvas = eventContext_.getCanvas(); + const curShape = svgCanvas.getStyle(); + const svgRoot = eventContext_.getSVGRoot(); const { $id } = svgCanvas; - if (eventContext_.getCanvas().spaceKey || evt.button === 1) { return; } - const rightClick = evt.button === 2; + if (svgCanvas.spaceKey || evt.button === 1) { return; } + + const rightClick = (evt.button === 2); if (evt.altKey) { // duplicate when dragging - eventContext_.getCanvas().cloneSelectedElements(0, 0); + svgCanvas.cloneSelectedElements(0, 0); } eventContext_.setRootSctm($id('svgcontent').querySelector('g').getScreenCTM().inverse()); @@ -947,7 +958,7 @@ export const mouseDownEvent = function (evt) { let x = mouseX / currentZoom; let y = mouseY / currentZoom; - let mouseTarget = eventContext_.getCanvas().getMouseTarget(evt); + let mouseTarget = svgCanvas.getMouseTarget(evt); if (mouseTarget.tagName === 'a' && mouseTarget.childNodes.length === 1) { mouseTarget = mouseTarget.firstChild; @@ -971,18 +982,19 @@ export const mouseDownEvent = function (evt) { // if it is a selector grip, then it must be a single element selected, // set the mouseTarget to that and update the mode to rotate/resize - if (mouseTarget === eventContext_.getCanvas().selectorManager.selectorParentGroup && !isNullish(selectedElements[0])) { + if (mouseTarget === svgCanvas.selectorManager.selectorParentGroup && !isNullish(selectedElements()[0])) { const grip = evt.target; const griptype = dataStorage.get(grip, 'type'); // rotating if (griptype === 'rotate') { eventContext_.setCurrentMode('rotate'); + // eventContext_.setCurrentRotateMode(dataStorage.get(grip, 'dir')); // resizing } else if (griptype === 'resize') { eventContext_.setCurrentMode('resize'); eventContext_.setCurrentResizeMode(dataStorage.get(grip, 'dir')); } - mouseTarget = selectedElements[0]; + mouseTarget = selectedElements()[0]; } eventContext_.setStartTransform(mouseTarget.getAttribute('transform')); @@ -994,39 +1006,39 @@ export const mouseDownEvent = function (evt) { eventContext_.setCurrentResizeMode('none'); if (rightClick) { eventContext_.setStarted(false); } - if (mouseTarget !== eventContext_.getSVGRoot()) { + if (mouseTarget !== svgRoot) { // if this element is not yet selected, clear selection and select it - if (!selectedElements.includes(mouseTarget)) { + if (!selectedElements().includes(mouseTarget)) { // only clear selection if shift is not pressed (otherwise, add // element to selection) if (!evt.shiftKey) { // No need to do the call here as it will be done on addToSelection - eventContext_.getCanvas().clearSelection(true); + svgCanvas.clearSelection(true); } - eventContext_.getCanvas().addToSelection([ mouseTarget ]); + svgCanvas.addToSelection([ mouseTarget ]); eventContext_.setJustSelected(mouseTarget); - eventContext_.getCanvas().pathActions.clear(); + svgCanvas.pathActions.clear(); } // else if it's a path, go into pathedit mode in mouseup if (!rightClick) { // insert a dummy transform so if the element(s) are moved it will have // a transform to use for its translate - for (const selectedElement of selectedElements) { + for (const selectedElement of selectedElements()) { if (isNullish(selectedElement)) { continue; } const slist = getTransformList(selectedElement); if (slist.numberOfItems) { - slist.insertItemBefore(eventContext_.getSVGRoot().createSVGTransform(), 0); + slist.insertItemBefore(svgRoot.createSVGTransform(), 0); } else { - slist.appendItem(eventContext_.getSVGRoot().createSVGTransform()); + slist.appendItem(svgRoot.createSVGTransform()); } } } } else if (!rightClick) { - eventContext_.getCanvas().clearSelection(); + svgCanvas.clearSelection(); eventContext_.setCurrentMode('multiselect'); if (isNullish(eventContext_.getRubberBox())) { - eventContext_.setRubberBox(eventContext_.getCanvas().selectorManager.getRubberBandBox()); + eventContext_.setRubberBox(svgCanvas.selectorManager.getRubberBandBox()); } eventContext_.setRStartX(eventContext_.getRStartX() * currentZoom); eventContext_.setRStartY(eventContext_.getRStartY() * currentZoom); @@ -1043,7 +1055,7 @@ export const mouseDownEvent = function (evt) { case 'zoom': eventContext_.setStarted(true); if (isNullish(eventContext_.getRubberBox())) { - eventContext_.setRubberBox(eventContext_.getCanvas().selectorManager.getRubberBandBox()); + eventContext_.setRubberBox(svgCanvas.selectorManager.getRubberBandBox()); } assignAttributes(eventContext_.getRubberBox(), { x: realX * currentZoom, @@ -1072,43 +1084,13 @@ export const mouseDownEvent = function (evt) { const pos = getRotationAngle(mouseTarget) ? 1 : 0; if (hasMatrixTransform(tlist)) { - tlist.insertItemBefore(eventContext_.getSVGRoot().createSVGTransform(), pos); - tlist.insertItemBefore(eventContext_.getSVGRoot().createSVGTransform(), pos); - tlist.insertItemBefore(eventContext_.getSVGRoot().createSVGTransform(), pos); + tlist.insertItemBefore(svgRoot.createSVGTransform(), pos); + tlist.insertItemBefore(svgRoot.createSVGTransform(), pos); + tlist.insertItemBefore(svgRoot.createSVGTransform(), pos); } else { - tlist.appendItem(eventContext_.getSVGRoot().createSVGTransform()); - tlist.appendItem(eventContext_.getSVGRoot().createSVGTransform()); - tlist.appendItem(eventContext_.getSVGRoot().createSVGTransform()); - - if (supportsNonScalingStroke()) { - // Handle crash for newer Chrome and Safari 6 (Mobile and Desktop): - // https://code.google.com/p/svg-edit/issues/detail?id=904 - // Chromium issue: https://code.google.com/p/chromium/issues/detail?id=114625 - // TODO: Remove this workaround once vendor fixes the issue - const iswebkit = isWebkit(); - - let delayedStroke; - if (iswebkit) { - delayedStroke = function (ele) { - const stroke_ = ele.getAttribute('stroke'); - ele.removeAttribute('stroke'); - // Re-apply stroke after delay. Anything higher than 1 seems to cause flicker - if (stroke_ !== null) setTimeout(function () { ele.setAttribute('stroke', stroke_); }, 0); - }; - } - mouseTarget.style.vectorEffect = 'non-scaling-stroke'; - if (iswebkit) { delayedStroke(mouseTarget); } - - const all = mouseTarget.getElementsByTagName('*'); - const len = all.length; - for (let i = 0; i < len; i++) { - if (!all[i].style) { // mathML - continue; - } - all[i].style.vectorEffect = 'non-scaling-stroke'; - if (iswebkit) { delayedStroke(all[i]); } - } - } + tlist.appendItem(svgRoot.createSVGTransform()); + tlist.appendItem(svgRoot.createSVGTransform()); + tlist.appendItem(svgRoot.createSVGTransform()); } break; } @@ -1124,12 +1106,12 @@ export const mouseDownEvent = function (evt) { eventContext_.setDAttr(realX + ',' + realY + ' '); // Commented out as doing nothing now: // strokeW = parseFloat(curShape.stroke_width) === 0 ? 1 : curShape.stroke_width; - eventContext_.getCanvas().addSVGElementFromJson({ + svgCanvas.addSVGElementFromJson({ element: 'polyline', curStyles: true, attr: { points: eventContext_.getDAttr(), - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), fill: 'none', opacity: curShape.opacity / 2, 'stroke-linecap': 'round', @@ -1143,14 +1125,14 @@ export const mouseDownEvent = function (evt) { break; case 'image': { eventContext_.setStarted(true); - const newImage = eventContext_.getCanvas().addSVGElementFromJson({ + const newImage = svgCanvas.addSVGElementFromJson({ element: 'image', attr: { x, y, width: 0, height: 0, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), opacity: curShape.opacity / 2, style: 'pointer-events:inherit' } @@ -1166,7 +1148,7 @@ export const mouseDownEvent = function (evt) { eventContext_.setStarted(true); eventContext_.setStartX(x); eventContext_.setStartY(y); - eventContext_.getCanvas().addSVGElementFromJson({ + svgCanvas.addSVGElementFromJson({ element: 'rect', curStyles: true, attr: { @@ -1174,7 +1156,7 @@ export const mouseDownEvent = function (evt) { y, width: 0, height: 0, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), opacity: curShape.opacity / 2 } }); @@ -1182,7 +1164,7 @@ export const mouseDownEvent = function (evt) { case 'line': { eventContext_.setStarted(true); const strokeW = Number(curShape.stroke_width) === 0 ? 1 : curShape.stroke_width; - eventContext_.getCanvas().addSVGElementFromJson({ + svgCanvas.addSVGElementFromJson({ element: 'line', curStyles: true, attr: { @@ -1190,7 +1172,7 @@ export const mouseDownEvent = function (evt) { y1: y, x2: x, y2: y, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), stroke: curShape.stroke, 'stroke-width': strokeW, 'stroke-dasharray': curShape.stroke_dasharray, @@ -1205,21 +1187,21 @@ export const mouseDownEvent = function (evt) { break; } case 'circle': eventContext_.setStarted(true); - eventContext_.getCanvas().addSVGElementFromJson({ + svgCanvas.addSVGElementFromJson({ element: 'circle', curStyles: true, attr: { cx: x, cy: y, r: 0, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), opacity: curShape.opacity / 2 } }); break; case 'ellipse': eventContext_.setStarted(true); - eventContext_.getCanvas().addSVGElementFromJson({ + svgCanvas.addSVGElementFromJson({ element: 'ellipse', curStyles: true, attr: { @@ -1227,20 +1209,20 @@ export const mouseDownEvent = function (evt) { cy: y, rx: 0, ry: 0, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), opacity: curShape.opacity / 2 } }); break; case 'text': eventContext_.setStarted(true); - /* const newText = */ eventContext_.getCanvas().addSVGElementFromJson({ + /* const newText = */ svgCanvas.addSVGElementFromJson({ element: 'text', curStyles: true, attr: { x, y, - id: eventContext_.getCanvas().getNextId(), + id: svgCanvas.getNextId(), fill: eventContext_.getCurText('fill'), 'stroke-width': eventContext_.getCurText('stroke_width'), 'font-size': eventContext_.getCurText('font_size'), @@ -1257,19 +1239,19 @@ export const mouseDownEvent = function (evt) { case 'pathedit': eventContext_.setStartX(eventContext_.getStartX() * currentZoom); eventContext_.setStartY(eventContext_.getStartY() * currentZoom); - eventContext_.getCanvas().pathActions.mouseDown(evt, mouseTarget, eventContext_.getStartX(), eventContext_.getStartY()); + svgCanvas.pathActions.mouseDown(evt, mouseTarget, eventContext_.getStartX(), eventContext_.getStartY()); eventContext_.setStarted(true); break; case 'textedit': eventContext_.setStartX(eventContext_.getStartX() * currentZoom); eventContext_.setStartY(eventContext_.getStartY() * currentZoom); - eventContext_.getCanvas().textActions.mouseDown(evt, mouseTarget, eventContext_.getStartX(), eventContext_.getStartY()); + svgCanvas.textActions.mouseDown(evt, mouseTarget, eventContext_.getStartX(), eventContext_.getStartY()); eventContext_.setStarted(true); break; case 'rotate': eventContext_.setStarted(true); // we are starting an undoable change (a drag-rotation) - eventContext_.getCanvas().undoMgr.beginUndoableChange('transform', selectedElements); + svgCanvas.undoMgr.beginUndoableChange('transform', selectedElements()); break; default: // This could occur in an extension @@ -1285,11 +1267,11 @@ export const mouseDownEvent = function (evt) { * @property {Float} start_y y coordinate on canvas * @property {Element[]} selectedElements An array of the selected Elements */ - const extResult = eventContext_.getCanvas().runExtensions('mouseDown', { + const extResult = svgCanvas.runExtensions('mouseDown', { event: evt, start_x: eventContext_.getStartX(), start_y: eventContext_.getStartY(), - selectedElements + selectedElements: selectedElements() }, true); extResult.forEach(function(r){ @@ -1380,9 +1362,9 @@ export const DOMMouseScrollEvent = function (e) { y: topLeftNewCanvas.y - rulerwidth + editorFullH / 2 }; - eventContext_.getCanvas().setZoom(zoomlevel); + svgCanvas.setZoom(zoomlevel); document.getElementById('zoom').value = ((zoomlevel * 100).toFixed(1)); - eventContext_.getCanvas().call('updateCanvas', { center: false, newCtr }); - eventContext_.getCanvas().call('zoomDone'); + svgCanvas.call('updateCanvas', { center: false, newCtr }); + svgCanvas.call('zoomDone'); }; diff --git a/src/svgcanvas/svg-exec.js b/src/svgcanvas/svg-exec.js index c5e5b100..a83c6f68 100644 --- a/src/svgcanvas/svg-exec.js +++ b/src/svgcanvas/svg-exec.js @@ -36,6 +36,7 @@ const { let svgContext_ = null; let $id = null; +let svgCanvas = null; /** * @function module:svg-exec.init @@ -44,7 +45,7 @@ let $id = null; */ export const init = function (svgContext) { svgContext_ = svgContext; - const svgCanvas = svgContext_.getCanvas(); + svgCanvas = svgContext_.getCanvas(); $id = svgCanvas.$id; }; @@ -55,9 +56,9 @@ export const init = function (svgContext) { */ export const svgCanvasToString = function () { // keep calling it until there are none to remove - while (svgContext_.getCanvas().removeUnusedDefElems() > 0) { } // eslint-disable-line no-empty + while (svgCanvas.removeUnusedDefElems() > 0) { } // eslint-disable-line no-empty - svgContext_.getCanvas().pathActions.clear(true); + svgCanvas.pathActions.clear(true); // Keep SVG-Edit comment on top const childNodesElems = svgContext_.getSVGContent().childNodes; @@ -70,7 +71,7 @@ export const svgCanvasToString = function () { // Move out of in-group editing mode if (svgContext_.getCurrentGroup()) { draw.leaveContext(); - svgContext_.getCanvas().selectOnly([ svgContext_.getCurrentGroup() ]); + svgCanvas.selectOnly([ svgContext_.getCurrentGroup() ]); } const nakedSvgs = []; @@ -92,12 +93,12 @@ export const svgCanvasToString = function () { element.replaceWith(svg); } }); - const output = this.svgToString(svgContext_.getSVGContent(), 0); + const output = svgCanvas.svgToString(svgContext_.getSVGContent(), 0); // Rewrap gsvg if (nakedSvgs.length) { Array.prototype.forEach.call(nakedSvgs, function (el) { - svgContext_.getCanvas().groupSvgElem(el); + svgCanvas.groupSvgElem(el); }); } @@ -130,7 +131,7 @@ export const svgToString = function (elem, indent) { out.push('<'); out.push(elem.nodeName); if (elem.id === 'svgcontent') { // Process root element separately - const res = svgContext_.getCanvas().getResolution(); + const res = svgCanvas.getResolution(); const vb = ''; // TODO: Allow this by dividing all values by current baseVal @@ -211,7 +212,7 @@ export const svgToString = function (elem, indent) { if (attrVal.startsWith('pointer-events')) { continue; } if (attr.localName === 'class' && attrVal.startsWith('se_')) { continue; } out.push(' '); - if (attr.localName === 'd') { attrVal = svgContext_.getCanvas().pathActions.convertPath(elem, true); } + if (attr.localName === 'd') { attrVal = svgCanvas.pathActions.convertPath(elem, true); } if (!isNaN(attrVal)) { attrVal = shortFloat(attrVal); } else if (unitRe.test(attrVal)) { @@ -249,7 +250,7 @@ export const svgToString = function (elem, indent) { switch (child.nodeType) { case 1: // element node out.push('\n'); - out.push(this.svgToString(child, indent)); + out.push(svgCanvas.svgToString(child, indent)); break; case 3: { // text node const str = child.nodeValue.replace(/^\s+|\s+$/g, ''); @@ -311,7 +312,7 @@ export const setSvgString = function (xmlString, preventUndo) { return false; } - this.prepareSvg(newDoc); + svgCanvas.prepareSvg(newDoc); const batchCmd = new BatchCommand('Change Source'); @@ -333,10 +334,10 @@ export const setSvgString = function (xmlString, preventUndo) { svgContext_.getSVGRoot().append(svgContext_.getSVGContent()); const content = svgContext_.getSVGContent(); - svgContext_.getCanvas().current_drawing_ = new draw.Drawing(svgContext_.getSVGContent(), svgContext_.getIdPrefix()); + svgCanvas.current_drawing_ = new draw.Drawing(svgContext_.getSVGContent(), svgContext_.getIdPrefix()); // retrieve or set the nonce - const nonce = svgContext_.getCanvas().getCurrentDrawing().getNonce(); + const nonce = svgCanvas.getCurrentDrawing().getNonce(); if (nonce) { svgContext_.call('setnonce', nonce); } else { @@ -347,7 +348,7 @@ export const setSvgString = function (xmlString, preventUndo) { const elements = content.querySelectorAll('image'); Array.prototype.forEach.call(elements, function (image) { preventClickDefault(image); - const val = svgContext_.getCanvas().getHref(image); + const val = svgCanvas.getHref(image); if (val) { if (val.startsWith('data:')) { // Check if an SVG-edit data URI @@ -364,7 +365,7 @@ export const setSvgString = function (xmlString, preventUndo) { } } // Add to encodableImages if it loads - svgContext_.getCanvas().embedImage(val); + svgCanvas.embedImage(val); } }); @@ -374,15 +375,15 @@ export const setSvgString = function (xmlString, preventUndo) { // Skip if it's in a if (getClosest(element.parentNode, 'defs')) { return; } - svgContext_.getCanvas().uniquifyElems(element); + svgCanvas.uniquifyElems(element); // Check if it already has a gsvg group const pa = element.parentNode; if (pa.childNodes.length === 1 && pa.nodeName === 'g') { dataStorage.put(pa, 'gsvg', element); - pa.id = pa.id || svgContext_.getCanvas().getNextId(); + pa.id = pa.id || svgCanvas.getNextId(); } else { - svgContext_.getCanvas().groupSvgElem(element); + svgCanvas.groupSvgElem(element); } }); @@ -398,9 +399,9 @@ export const setSvgString = function (xmlString, preventUndo) { // Set ref element for elements // TODO: This should also be done if the object is re-added through "redo" - svgContext_.getCanvas().setUseData(content); + svgCanvas.setUseData(content); - svgContext_.getCanvas().convertGradients(content); + svgCanvas.convertGradients(content); const attrs = { id: 'svgcontent', @@ -437,7 +438,7 @@ export const setSvgString = function (xmlString, preventUndo) { Array.prototype.forEach.call(chiElems, function (chiElem) { const visElems = chiElem.querySelectorAll(svgContext_.getVisElems()); Array.prototype.forEach.call(visElems, function (elem) { - if (!elem.id) { elem.id = svgContext_.getCanvas().getNextId(); } + if (!elem.id) { elem.id = svgCanvas.getNextId(); } }); }); @@ -456,8 +457,8 @@ export const setSvgString = function (xmlString, preventUndo) { for (const [ key, value ] of Object.entries(attrs)) { content.setAttribute(key, value); } - this.contentW = attrs.width; - this.contentH = attrs.height; + svgCanvas.contentW = attrs.width; + svgCanvas.contentH = attrs.height; batchCmd.addSubCommand(new InsertElementCommand(svgContext_.getSVGContent())); // update root to the correct size @@ -471,9 +472,9 @@ export const setSvgString = function (xmlString, preventUndo) { // reset transform lists resetListMap(); - svgContext_.getCanvas().clearSelection(); + svgCanvas.clearSelection(); pathModule.clearData(); - svgContext_.getSVGRoot().append(svgContext_.getCanvas().selectorManager.selectorParentGroup); + svgContext_.getSVGRoot().append(svgCanvas.selectorManager.selectorParentGroup); if (!preventUndo) svgContext_.addCommandToHistory(batchCmd); svgContext_.call('changed', [ svgContext_.getSVGContent() ]); @@ -524,7 +525,7 @@ export const importSvgString = function (xmlString) { // convert string into XML document const newDoc = text2xml(xmlString); - this.prepareSvg(newDoc); + svgCanvas.prepareSvg(newDoc); // import new svg document into our document // If DOM3 adoptNode() available, use it. Otherwise fall back to DOM2 importNode() @@ -532,7 +533,7 @@ export const importSvgString = function (xmlString) { ? svgContext_.getDOMDocument().adoptNode(newDoc.documentElement) : svgContext_.getDOMDocument().importNode(newDoc.documentElement, true); - svgContext_.getCanvas().uniquifyElems(svg); + svgCanvas.uniquifyElems(svg); const innerw = convertToNum('width', svg.getAttribute('width')); const innerh = convertToNum('height', svg.getAttribute('height')); @@ -574,7 +575,7 @@ export const importSvgString = function (xmlString) { for (const attr of attrs) { // Ok for `NamedNodeMap` symbol.setAttribute(attr.nodeName, attr.value); } - symbol.id = svgContext_.getCanvas().getNextId(); + symbol.id = svgCanvas.getNextId(); // Store data svgContext_.setImportIds(uid, { @@ -587,18 +588,18 @@ export const importSvgString = function (xmlString) { } useEl = svgContext_.getDOMDocument().createElementNS(NS.SVG, 'use'); - useEl.id = svgContext_.getCanvas().getNextId(); - svgContext_.getCanvas().setHref(useEl, '#' + symbol.id); + useEl.id = svgCanvas.getNextId(); + svgCanvas.setHref(useEl, '#' + symbol.id); - (svgContext_.getCurrentGroup() || svgContext_.getCanvas().getCurrentDrawing().getCurrentLayer()).append(useEl); + (svgContext_.getCurrentGroup() || svgCanvas.getCurrentDrawing().getCurrentLayer()).append(useEl); batchCmd.addSubCommand(new InsertElementCommand(useEl)); - svgContext_.getCanvas().clearSelection(); + svgCanvas.clearSelection(); useEl.setAttribute('transform', ts); recalculateDimensions(useEl); dataStorage.put(useEl, 'symbol', symbol); dataStorage.put(useEl, 'ref', symbol); - svgContext_.getCanvas().addToSelection([ useEl ]); + svgCanvas.addToSelection([ useEl ]); // TODO: Find way to add this in a recalculateDimensions-parsable way // if (vb[0] !== 0 || vb[1] !== 0) { @@ -646,7 +647,7 @@ export const embedImage = function (src) { } catch (e) { svgContext_.setEncodableImages(src, false); } - svgContext_.getCanvas().setGoodImage(src); + svgCanvas.setGoodImage(src); resolve(svgContext_.getEncodableImages(src)); }); imgI.addEventListener("error", (e) => { @@ -667,10 +668,10 @@ export const embedImage = function (src) { */ export const save = function (opts) { // remove the selected outline before serializing - svgContext_.getCanvas().clearSelection(); + svgCanvas.clearSelection(); // Update save options if provided if (opts) { - const saveOptions = svgContext_.getCanvas().mergeDeep(svgContext_.getSvgOption(), opts); + const saveOptions = svgCanvas.mergeDeep(svgContext_.getSvgOption(), opts); for (const [ key, value ] of Object.entries(saveOptions)) { svgContext_.setSvgOption(key, value); } @@ -678,7 +679,7 @@ export const save = function (opts) { svgContext_.setSvgOption('apply', true); // no need for doctype, see https://jwatt.org/svg/authoring/#doctype-declaration - const str = svgContext_.getCanvas().svgCanvasToString(); + const str = svgCanvas.svgCanvasToString(); svgContext_.call('saved', str); }; /** @@ -694,7 +695,7 @@ export const save = function (opts) { function getIssues() { const uiStrings = svgContext_.getUIStrings(); // remove the selected outline before serializing - svgContext_.getCanvas().clearSelection(); + svgCanvas.clearSelection(); // Check for known CanVG issues const issues = []; @@ -752,7 +753,7 @@ export const rasterExport = async function (imgType, quality, exportWindowName, const type = imgType === 'ICO' ? 'BMP' : (imgType || 'PNG'); const mimeType = 'image/' + type.toLowerCase(); const { issues, issueCodes } = getIssues(); - const svg = this.svgCanvasToString(); + const svg = svgCanvas.svgCanvasToString(); if (!$id('export_canvas')) { const canvasEx = document.createElement('CANVAS'); @@ -761,8 +762,8 @@ export const rasterExport = async function (imgType, quality, exportWindowName, document.body.appendChild(canvasEx); } const c = $id('export_canvas'); - c.style.width = svgContext_.getCanvas().contentW + "px"; - c.style.height = svgContext_.getCanvas().contentH + "px"; + c.style.width = svgCanvas.contentW + "px"; + c.style.height = svgCanvas.contentH + "px"; const canvg = svgContext_.getcanvg(); const ctx = c.getContext('2d'); const v = canvg.fromString(ctx, svg); @@ -837,7 +838,7 @@ export const exportPDF = async ( exportWindowName, outputType = isChrome() ? 'save' : undefined ) => { - const res = svgContext_.getCanvas().getResolution(); + const res = svgCanvas.getResolution(); const orientation = res.w > res.h ? 'landscape' : 'portrait'; const unit = 'pt'; // curConfig.baseUnit; // We could use baseUnit, but that is presumably not intended for export purposes @@ -848,7 +849,7 @@ export const exportPDF = async ( format: [ res.w, res.h ] // , compressPdf: true }); - const docTitle = svgContext_.getCanvas().getDocumentTitle(); + const docTitle = svgCanvas.getDocumentTitle(); doc.setProperties({ title: docTitle /* , subject: '', @@ -908,7 +909,7 @@ export const uniquifyElemsMethod = function (g) { const attrnode = n.getAttributeNode(attr); if (attrnode) { // the incoming file has been sanitized, so we should be able to safely just strip off the leading # - const url = svgContext_.getCanvas().getUrlFromAttr(attrnode.value); + const url = svgCanvas.getUrlFromAttr(attrnode.value); const refid = url ? url.substr(1) : null; if (refid) { if (!(refid in ids)) { @@ -921,7 +922,7 @@ export const uniquifyElemsMethod = function (g) { }); // check xlink:href now - const href = svgContext_.getCanvas().getHref(n); + const href = svgCanvas.getHref(n); // TODO: what if an or element refers to an element internally? if (href && refElems.includes(n.nodeName)) { const refid = href.substr(1); @@ -941,7 +942,7 @@ export const uniquifyElemsMethod = function (g) { if (!oldid) { continue; } const { elem } = ids[oldid]; if (elem) { - const newid = svgContext_.getCanvas().getNextId(); + const newid = svgCanvas.getNextId(); // assign element its new id elem.id = newid; @@ -959,7 +960,7 @@ export const uniquifyElemsMethod = function (g) { let k = hreffers.length; while (k--) { const hreffer = hreffers[k]; - svgContext_.getCanvas().setHref(hreffer, '#' + newid); + svgCanvas.setHref(hreffer, '#' + newid); } } } @@ -981,8 +982,8 @@ export const setUseDataMethod = function (parent) { Array.prototype.forEach.call(elems, function (el, _) { const dataStorage = svgContext_.getDataStorage(); - const id = svgContext_.getCanvas().getHref(el).substr(1); - const refElem = svgContext_.getCanvas().getElem(id); + const id = svgCanvas.getHref(el).substr(1); + const refElem = svgCanvas.getElem(id); if (!refElem) { return; } dataStorage.put(el, 'ref', refElem); if (refElem.tagName === 'symbol' || refElem.tagName === 'svg') { @@ -1016,7 +1017,7 @@ export const removeUnusedDefElemsMethod = function () { for (i = 0; i < allLen; i++) { const el = allEls[i]; for (j = 0; j < alen; j++) { - const ref = svgContext_.getCanvas().getUrlFromAttr(el.getAttribute(attrs[j])); + const ref = svgCanvas.getUrlFromAttr(el.getAttribute(attrs[j])); if (ref) { defelemUses.push(ref.substr(1)); } @@ -1080,7 +1081,7 @@ export const convertGradientsMethod = function (elem) { x1: grad.getAttribute('x1'), y1: grad.getAttribute('y1'), x2: grad.getAttribute('x2'), - y2: grad.getAttribute('y2'), + y2: grad.getAttribute('y2') }; // If has transform, convert From a4ef20605009af803a881b4dc827b3e25b91163c Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Sun, 30 May 2021 22:26:04 +0200 Subject: [PATCH 3/5] selectedElements was assigned initially but need a function to capture changes --- src/svgcanvas/selection.js | 72 +++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/src/svgcanvas/selection.js b/src/svgcanvas/selection.js index 6301214e..7435f48d 100644 --- a/src/svgcanvas/selection.js +++ b/src/svgcanvas/selection.js @@ -18,6 +18,8 @@ import { getClosest } from '../editor/components/jgraduate/Util.js'; const { BatchCommand } = hstry; let selectionContext_ = null; +let svgCanvas = null; +let selectedElements; /** * @function module:selection.init @@ -26,6 +28,8 @@ let selectionContext_ = null; */ export const init = function (selectionContext) { selectionContext_ = selectionContext; + svgCanvas = selectionContext_.getCanvas(); + selectedElements = selectionContext_.getSelectedElements; }; /** @@ -36,16 +40,15 @@ export const init = function (selectionContext) { * @fires module:selection.SvgCanvas#event:selected */ export const clearSelectionMethod = function (noCall) { - const selectedElements = selectionContext_.getSelectedElements(); - selectedElements.forEach((elem) => { + selectedElements().forEach((elem) => { if (isNullish(elem)) { return; } - selectionContext_.getCanvas().selectorManager.releaseSelector(elem); + svgCanvas.selectorManager.releaseSelector(elem); }); - selectionContext_.getCanvas().setEmptySelectedElements(); + svgCanvas.setEmptySelectedElements(); - if (!noCall) { selectionContext_.getCanvas().call('selected', selectionContext_.getSelectedElements()); } + if (!noCall) { svgCanvas.call('selected', selectedElements()); } }; /** @@ -55,13 +58,12 @@ export const clearSelectionMethod = function (noCall) { * @fires module:selection.SvgCanvas#event:selected */ export const addToSelectionMethod = function (elemsToAdd, showGrips) { - const selectedElements = selectionContext_.getSelectedElements(); if (!elemsToAdd.length) { return; } // find the first null in our selectedElements array let j = 0; - while (j < selectedElements.length) { - if (isNullish(selectedElements[j])) { + while (j < selectedElements().length) { + if (isNullish(selectedElements()[j])) { break; } ++j; @@ -81,32 +83,32 @@ export const addToSelectionMethod = function (elemsToAdd, showGrips) { } // if it's not already there, add it - if (!selectedElements.includes(elem)) { - selectedElements[j] = elem; + if (!selectedElements().includes(elem)) { + selectedElements()[j] = elem; // only the first selectedBBoxes element is ever used in the codebase these days // if (j === 0) selectedBBoxes[0] = utilsGetBBox(elem); j++; - const sel = selectionContext_.getCanvas().selectorManager.requestSelector(elem, bbox); + const sel = svgCanvas.selectorManager.requestSelector(elem, bbox); - if (selectedElements.length > 1) { + if (selectedElements().length > 1) { sel.showGrips(false); } } } - if (!selectedElements.length) { + if (!selectedElements().length) { return; } - selectionContext_.getCanvas().call('selected', selectedElements); + svgCanvas.call('selected', selectedElements()); - if (selectedElements.length === 1) { - selectionContext_.getCanvas().selectorManager.requestSelector(selectedElements[0]).showGrips(showGrips); + if (selectedElements().length === 1) { + svgCanvas.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 - selectedElements.sort(function (a, b) { + selectedElements().sort(function (a, b) { if (a && b && a.compareDocumentPosition) { return 3 - (b.compareDocumentPosition(a) & 6); // eslint-disable-line no-bitwise } @@ -117,8 +119,8 @@ export const addToSelectionMethod = function (elemsToAdd, showGrips) { }); // Make sure first elements are not null - while (isNullish(selectedElements[0])) { - selectedElements.shift(0); + while (isNullish(selectedElements())[0]) { + selectedElements().shift(0); } }; /** @@ -147,7 +149,7 @@ export const getMouseTargetMethod = function (evt) { // Get the desired mouseTarget with jQuery selector-fu // If it's root-like, select the root - const currentLayer = selectionContext_.getCanvas().getCurrentDrawing().getCurrentLayer(); + const currentLayer = svgCanvas.getCurrentDrawing().getCurrentLayer(); const svgRoot = selectionContext_.getSVGRoot(); const container = selectionContext_.getDOMContainer(); const content = selectionContext_.getSVGContent(); @@ -159,7 +161,7 @@ export const getMouseTargetMethod = function (evt) { if (getClosest(mouseTarget.parentNode, '#selectorParentGroup')) { // While we could instead have just returned mouseTarget, // this makes it easier to indentify as being a selector grip - return selectionContext_.getCanvas().selectorManager.selectorParentGroup; + return svgCanvas.selectorManager.selectorParentGroup; } while (!mouseTarget.parentNode?.isSameNode(selectionContext_.getCurrentGroup() || currentLayer)) { @@ -253,7 +255,7 @@ export const getIntersectionListMethod = function (rect) { const currentZoom = selectionContext_.getCurrentZoom(); if (isNullish(selectionContext_.getRubberBox())) { return null; } - const parent = selectionContext_.getCurrentGroup() || selectionContext_.getCanvas().getCurrentDrawing().getCurrentLayer(); + const parent = selectionContext_.getCurrentGroup() || svgCanvas.getCurrentDrawing().getCurrentLayer(); let rubberBBox; if (!rect) { @@ -315,7 +317,7 @@ export const groupSvgElem = function (elem) { elem.replaceWith(g); g.appendChild(elem); dataStorage.put(g, 'gsvg', elem); - g.id = selectionContext_.getCanvas().getNextId(); + g.id = svgCanvas.getNextId(); }; /** @@ -325,13 +327,13 @@ export const groupSvgElem = function (elem) { * @returns {void} */ export const prepareSvg = function (newDoc) { - selectionContext_.getCanvas().sanitizeSvg(newDoc.documentElement); + svgCanvas.sanitizeSvg(newDoc.documentElement); // convert paths into absolute commands const paths = [ ...newDoc.getElementsByTagNameNS(NS.SVG, 'path') ]; paths.forEach((path) => { - path.setAttribute('d', selectionContext_.getCanvas().pathActions.convertPath(path)); - selectionContext_.getCanvas().pathActions.fixEnd(path); + path.setAttribute('d', svgCanvas.pathActions.convertPath(path)); + svgCanvas.pathActions.fixEnd(path); }); }; @@ -345,10 +347,9 @@ export const prepareSvg = function (newDoc) { * @returns {void} */ export const setRotationAngle = function (val, preventUndo) { - const selectedElements = selectionContext_.getSelectedElements(); // ensure val is the proper type val = Number.parseFloat(val); - const elem = selectedElements[0]; + const elem = selectedElements()[0]; const oldTransform = elem.getAttribute('transform'); const bbox = utilsGetBBox(elem); const cx = bbox.x + bbox.width / 2; const cy = bbox.y + bbox.height / 2; @@ -384,14 +385,14 @@ export const setRotationAngle = function (val, preventUndo) { } else { elem.removeAttribute('transform'); } - selectionContext_.getCanvas().changeSelectedAttribute('transform', newTransform, selectedElements); - selectionContext_.getCanvas().call('changed', selectedElements); + svgCanvas.changeSelectedAttribute('transform', newTransform, selectedElements()); + svgCanvas.call('changed', selectedElements()); } // const pointGripContainer = getElem('pathpointgrip_container'); // if (elem.nodeName === 'path' && pointGripContainer) { // pathActions.setPointContainerTransform(elem.getAttribute('transform')); // } - const selector = selectionContext_.getCanvas().selectorManager.requestSelector(selectedElements[0]); + const selector = svgCanvas.selectorManager.requestSelector(selectedElements()[0]); selector.resize(); selectionContext_.getSelector().updateGripCursors(val); }; @@ -404,15 +405,14 @@ export const setRotationAngle = function (val, preventUndo) { * @returns {void} */ export const recalculateAllSelectedDimensions = function () { - const selectedElements = selectionContext_.getSelectedElements(); const text = (selectionContext_.getCurrentResizeMode() === 'none' ? 'position' : 'size'); const batchCmd = new BatchCommand(text); - let i = selectedElements.length; + let i = selectedElements().length; while (i--) { - const elem = selectedElements[i]; + const elem = selectedElements()[i]; // if (getRotationAngle(elem) && !hasMatrixTransform(getTransformList(elem))) { continue; } - const cmd = selectionContext_.getCanvas().recalculateDimensions(elem); + const cmd = svgCanvas.recalculateDimensions(elem); if (cmd) { batchCmd.addSubCommand(cmd); } @@ -420,6 +420,6 @@ export const recalculateAllSelectedDimensions = function () { if (!batchCmd.isEmpty()) { selectionContext_.addCommandToHistory(batchCmd); - selectionContext_.getCanvas().call('changed', selectedElements); + svgCanvas.call('changed', selectedElements()); } }; From 074df9cdec8ad9baf89081c3004a85dc09fffdc1 Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Mon, 31 May 2021 00:09:51 +0200 Subject: [PATCH 4/5] eslint: enforce use of const when variable not modified --- .eslintrc.js | 10 ++++++++-- cypress/integration/unit/recalculate.js | 2 +- cypress/integration/unit/select.js | 2 +- src/editor/Editor.js | 4 ++-- src/editor/EditorStartup.js | 2 +- src/editor/components/jgraduate/Util.js | 4 ++-- src/editor/components/jgraduate/jQuery.jPicker.js | 2 +- .../extensions/ext-foreignobject/ext-foreignobject.js | 2 +- src/editor/extensions/ext-helloworld/ext-helloworld.js | 2 +- src/editor/extensions/ext-imagelib/ext-imagelib.js | 2 +- .../ext-overview_window/dragmove/dragmove.js | 2 +- src/editor/extensions/ext-placemark/ext-placemark.js | 4 ++-- .../extensions/ext-server_opensave/ext-php_savefile.js | 2 +- src/svgcanvas/draw.js | 2 +- src/svgcanvas/svgcanvas.js | 4 ++-- src/svgcanvas/utilities.js | 2 +- 16 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1819e570..ae593bc2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -32,12 +32,17 @@ module.exports = { /** @todo cognitive complexity should be much lower (25-50?) */ "sonarjs/cognitive-complexity": [ "warn", 200 ], /** @todo no param reassign creates too many warnings but should be a warning */ - "comma-dangle": [ "error" ], "no-param-reassign": "off", + /** @todo no use before define creates too many warnings but should be a warning */ + "no-use-before-define": "off", + /** @todo camel case creates too many warnings but should be a warning */ + "camelcase": "off", + "comma-dangle": [ "error" ], "node/no-unsupported-features/es-syntax": 0, "no-unused-vars": [ "error", { "argsIgnorePattern": "^_" } ], "sonarjs/no-duplicate-string": 0, "semi" : "error", + "prefer-const": "error", "no-trailing-spaces": "error", "array-bracket-spacing": [ "error", "always" ], "comma-spacing": "error", @@ -85,7 +90,8 @@ module.exports = { { files: [ 'src/editor/locale/*.js' ], rules: { // lang files may have long length - "max-len": "off" + "max-len": "off", + "camelcase": "off" } } ] diff --git a/cypress/integration/unit/recalculate.js b/cypress/integration/unit/recalculate.js index e81610f0..cf6254a9 100644 --- a/cypress/integration/unit/recalculate.js +++ b/cypress/integration/unit/recalculate.js @@ -33,7 +33,7 @@ describe('recalculate', function () { return this._storage.has(element) && this._storage.get(element).has(key); }, remove: function (element, key) { - let ret = this._storage.get(element).delete(key); + const ret = this._storage.get(element).delete(key); if (!this._storage.get(element).size === 0) { this._storage.delete(element); } diff --git a/cypress/integration/unit/select.js b/cypress/integration/unit/select.js index 0dba2bb0..f4c83df2 100644 --- a/cypress/integration/unit/select.js +++ b/cypress/integration/unit/select.js @@ -27,7 +27,7 @@ describe('select', function () { return this._storage.has(element) && this._storage.get(element).has(key); }, remove: function (element, key) { - let ret = this._storage.get(element).delete(key); + const ret = this._storage.get(element).delete(key); if (!this._storage.get(element).size === 0) { this._storage.delete(element); } diff --git a/src/editor/Editor.js b/src/editor/Editor.js index 99886243..b8a7420b 100644 --- a/src/editor/Editor.js +++ b/src/editor/Editor.js @@ -281,11 +281,11 @@ class Editor extends EditorStartup { parentSelector = document; } - let parents = []; + const parents = []; let p = el.parentNode; while (p !== parentSelector) { - let o = p; + const o = p; parents.push(o); p = o.parentNode; } diff --git a/src/editor/EditorStartup.js b/src/editor/EditorStartup.js index 3ca32dd8..50b1a7f6 100644 --- a/src/editor/EditorStartup.js +++ b/src/editor/EditorStartup.js @@ -255,7 +255,7 @@ class EditorStartup { }); function addListenerMulti(element, eventNames, listener) { - let events = eventNames.split(' '); + const events = eventNames.split(' '); for (let i=0, iLen=events.length; i { if (isObject(source[key])) { @@ -146,7 +146,7 @@ export function getParents(elem, selector) { } export function getParentsUntil(elem, parent, selector) { - let parents = []; + const parents = []; let parentType; let selectorType; if ( parent ) { diff --git a/src/editor/components/jgraduate/jQuery.jPicker.js b/src/editor/components/jgraduate/jQuery.jPicker.js index 2cd62d1d..58bf20a9 100755 --- a/src/editor/components/jgraduate/jQuery.jPicker.js +++ b/src/editor/components/jgraduate/jQuery.jPicker.js @@ -1652,7 +1652,7 @@ export function jPickerMethod (elem, options, commitCallback, liveCallback, canc let iconColor = null; // iconColor for popup icon let iconAlpha = null; // iconAlpha for popup icon let iconImage = null; // iconImage popup icon - let moveBar = null; // drag bar + const moveBar = null; // drag bar Object.assign(that, { // public properties, methods, and callbacks commitCallback, // commitCallback function can be overridden to return the selected color to a method you specify when the user clicks "OK" diff --git a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js index 9dd7a5b8..24e0797c 100644 --- a/src/editor/extensions/ext-foreignobject/ext-foreignobject.js +++ b/src/editor/extensions/ext-foreignobject/ext-foreignobject.js @@ -221,7 +221,7 @@ export default { // setSelectMode(); }); - let oldToolSourceCancel = $id('tool_source_cancel'); + const oldToolSourceCancel = $id('tool_source_cancel'); const toolSourceCancel = oldToolSourceCancel.cloneNode(true); toolSourceCancel.style.display = 'none'; toolSourceCancel.id = 'foreign_cancel'; diff --git a/src/editor/extensions/ext-helloworld/ext-helloworld.js b/src/editor/extensions/ext-helloworld/ext-helloworld.js index b6c46cba..43bc7598 100644 --- a/src/editor/extensions/ext-helloworld/ext-helloworld.js +++ b/src/editor/extensions/ext-helloworld/ext-helloworld.js @@ -76,7 +76,7 @@ export default { const y = opts.mouse_y / zoom; // We do our own formatting - let text = svgEditor.i18next.t(`${name}:text`, { x, y }); + const text = svgEditor.i18next.t(`${name}:text`, { x, y }); // Show the text using the custom alert function alert(text); } diff --git a/src/editor/extensions/ext-imagelib/ext-imagelib.js b/src/editor/extensions/ext-imagelib/ext-imagelib.js index e4dcfcc9..07e6ce2d 100644 --- a/src/editor/extensions/ext-imagelib/ext-imagelib.js +++ b/src/editor/extensions/ext-imagelib/ext-imagelib.js @@ -507,7 +507,7 @@ export default { libOpts.style.display = 'none'; back.style.display = 'block'; }); - let span = document.createElement("span"); + const span = document.createElement("span"); span.textContent = description; li.appendChild(span); }); diff --git a/src/editor/extensions/ext-overview_window/dragmove/dragmove.js b/src/editor/extensions/ext-overview_window/dragmove/dragmove.js index 2b5d876f..04348e31 100644 --- a/src/editor/extensions/ext-overview_window/dragmove/dragmove.js +++ b/src/editor/extensions/ext-overview_window/dragmove/dragmove.js @@ -4,7 +4,7 @@ // can't use npm version as the dragmove is different. let _loaded = false; -let _callbacks = []; +const _callbacks = []; const _isTouch = window.ontouchstart !== undefined; export const dragmove = function(target, handler, parent, onStart, onEnd, onDrag) { diff --git a/src/editor/extensions/ext-placemark/ext-placemark.js b/src/editor/extensions/ext-placemark/ext-placemark.js index cd34abf2..27f0452c 100644 --- a/src/editor/extensions/ext-placemark/ext-placemark.js +++ b/src/editor/extensions/ext-placemark/ext-placemark.js @@ -104,7 +104,7 @@ export default { const items = txt.split(';'); selElems.forEach((elem) => { if (elem && elem.getAttribute('class').includes('placemark')) { - let elements = elem.children; + const elements = elem.children; Array.prototype.forEach.call(elements, function(i, _){ const [ , , type, n ] = i.id.split('_'); if (type === 'txt') { @@ -125,7 +125,7 @@ export default { font = font.join(' '); selElems.forEach((elem) => { if (elem && elem.getAttribute('class').includes('placemark')) { - let elements = elem.children; + const elements = elem.children; Array.prototype.forEach.call(elements, function(i, _){ const [ , , type ] = i.id.split('_'); if (type === 'txt') { diff --git a/src/editor/extensions/ext-server_opensave/ext-php_savefile.js b/src/editor/extensions/ext-server_opensave/ext-php_savefile.js index dfa9e452..c256f87e 100644 --- a/src/editor/extensions/ext-server_opensave/ext-php_savefile.js +++ b/src/editor/extensions/ext-server_opensave/ext-php_savefile.js @@ -23,7 +23,7 @@ export default { const filename = getFileNameFromTitle(); // $.post(saveSvgAction, { output_svg: svg, filename }); - let postData = { output_svg: svg, filename }; + const postData = { output_svg: svg, filename }; fetch(saveSvgAction, { method: "POST", body: JSON.stringify(postData) diff --git a/src/svgcanvas/draw.js b/src/svgcanvas/draw.js index 6e7ef811..01806af2 100644 --- a/src/svgcanvas/draw.js +++ b/src/svgcanvas/draw.js @@ -1020,7 +1020,7 @@ export const setContext = function (elem) { // Disable other elements const parentsUntil = getParentsUntil(elem, '#svgcontent'); - let siblings = []; + const siblings = []; parentsUntil.forEach(function (parent) { const elements = Array.prototype.filter.call(parent.parentNode.children, function(child){ return child !== parent; diff --git a/src/svgcanvas/svgcanvas.js b/src/svgcanvas/svgcanvas.js index 752dcadf..42e8bcc8 100644 --- a/src/svgcanvas/svgcanvas.js +++ b/src/svgcanvas/svgcanvas.js @@ -209,7 +209,7 @@ class SvgCanvas { return this._storage.has(element) && this._storage.get(element).has(key); }, remove: function (element, key) { - let ret = this._storage.get(element).delete(key); + const ret = this._storage.get(element).delete(key); if (!this._storage.get(element).size === 0) { this._storage.delete(element); } @@ -555,7 +555,7 @@ class SvgCanvas { const restoreRefElems = function (elem) { // Look for missing reference elements, restore any found - let attrs = {}; + const attrs = {}; refAttrs.forEach(function (item, _) { attrs[item] = elem.getAttribute(item); }); diff --git a/src/svgcanvas/utilities.js b/src/svgcanvas/utilities.js index 372e9e84..6b356fcd 100644 --- a/src/svgcanvas/utilities.js +++ b/src/svgcanvas/utilities.js @@ -576,7 +576,7 @@ function groupBBFix(selected) { let ret; let copy; if (ref) { - let elements = []; + const elements = []; Array.prototype.forEach.call(ref.children, function (el) { const elem = el.cloneNode(true); elem.setAttribute('visibility', 'hidden'); From 5682b7bc59f9990db9bd4223e040170dff00e3ae Mon Sep 17 00:00:00 2001 From: JFH <20402845+jfhenon@users.noreply.github.com> Date: Mon, 31 May 2021 00:10:26 +0200 Subject: [PATCH 5/5] restore 2 tests and fix snapshot --- badges/tests-badge.svg | 2 +- cypress/integration/ui/__snapshots__/scenario.js.snap | 8 -------- cypress/integration/unit/utilities-bbox.js | 4 ++-- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/badges/tests-badge.svg b/badges/tests-badge.svg index ecc8fc46..61b3e08c 100644 --- a/badges/tests-badge.svg +++ b/badges/tests-badge.svg @@ -1 +1 @@ -TestsTests139/139139/139 \ No newline at end of file +TestsTests141/141141/141 \ No newline at end of file diff --git a/cypress/integration/ui/__snapshots__/scenario.js.snap b/cypress/integration/ui/__snapshots__/scenario.js.snap index 37b89438..c148fed7 100644 --- a/cypress/integration/ui/__snapshots__/scenario.js.snap +++ b/cypress/integration/ui/__snapshots__/scenario.js.snap @@ -221,7 +221,6 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -286,7 +285,6 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -351,7 +349,6 @@ exports[`use various parts of svg-edit > check change color #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -416,7 +413,6 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -481,7 +477,6 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -546,7 +541,6 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -611,7 +605,6 @@ exports[`use various parts of svg-edit > check tool_star #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB @@ -701,7 +694,6 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = ` fill-opacity="1" stroke-opacity="1" id="svg_2" - transform="matrix(1 0 0 1 0 0)" > AB diff --git a/cypress/integration/unit/utilities-bbox.js b/cypress/integration/unit/utilities-bbox.js index b3497053..e76d12b1 100644 --- a/cypress/integration/unit/utilities-bbox.js +++ b/cypress/integration/unit/utilities-bbox.js @@ -149,7 +149,7 @@ describe('utilities bbox', function () { g.remove(); }); - it.skip('Test getBBoxWithTransform and a rotation transform', function () { + it('Test getBBoxWithTransform and a rotation transform', function () { const { getBBoxWithTransform } = utilities; let elem = mockCreateSVGElement({ @@ -231,7 +231,7 @@ describe('utilities bbox', function () { elem.remove(); }); - it.skip('Test getBBoxWithTransform with rotation and matrix transforms', function () { + it('Test getBBoxWithTransform with rotation and matrix transforms', function () { const { getBBoxWithTransform } = utilities; let tx = 10; // tx right