diff --git a/badges/coverage-badge.svg b/badges/coverage-badge.svg index 24d5755f..b9a72568 100644 --- a/badges/coverage-badge.svg +++ b/badges/coverage-badge.svg @@ -1 +1 @@ -Statements 53.1%Statements 53.1%Branches 41.93%Branches 41.93%Lines 53.92%Lines 53.92%Functions 60.63%Functions 60.63% +Statements 53.21%Statements 53.21%Branches 42.09%Branches 42.09%Lines 54.02%Lines 54.02%Functions 60.7%Functions 60.7% diff --git a/badges/tests-badge.svg b/badges/tests-badge.svg index 3c631ddc..054a703a 100644 --- a/badges/tests-badge.svg +++ b/badges/tests-badge.svg @@ -1 +1 @@ -TestsTests151/151151/151 \ No newline at end of file +TestsTests153/153153/153 \ 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 16495423..aef0794a 100644 --- a/cypress/integration/ui/__snapshots__/scenario.js.snap +++ b/cypress/integration/ui/__snapshots__/scenario.js.snap @@ -494,6 +494,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = ` font-weight="bold" text-decoration=" underline overline line-through" letter-spacing="150" + word-spacing="10" > B @@ -587,6 +588,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = ` font-weight="bold" text-decoration=" underline overline line-through" letter-spacing="150" + word-spacing="10" > B @@ -1113,3 +1115,71 @@ exports[`use various parts of svg-edit > check tool_letter_spacing #0`] = ` `; + +exports[`use various parts of svg-edit > check tool_word_spacing #0`] = ` + + + Layer 1 + + + B + + + B + + + +`; diff --git a/cypress/integration/ui/scenario.js b/cypress/integration/ui/scenario.js index fb6ddec9..f634450a 100644 --- a/cypress/integration/ui/scenario.js +++ b/cypress/integration/ui/scenario.js @@ -114,6 +114,14 @@ describe('use various parts of svg-edit', function () { .type('{enter}', {force: true}); testSnapshot(); }); + it('check tool_word_spacing', function () { + cy.get('#svg_1').click({force: true}); + cy.get('#word_spacing') + .type('{selectall}', {force: true}) + .type('10', {force: true}) + .type('{enter}', {force: true}); + testSnapshot(); + }); it('check tool_star', function () { cy.get('#tool_star') .click({force: true}); diff --git a/cypress/integration/unit/sanitize.js b/cypress/integration/unit/sanitize.js index 5842eea4..82726ee3 100644 --- a/cypress/integration/unit/sanitize.js +++ b/cypress/integration/unit/sanitize.js @@ -46,4 +46,14 @@ describe('sanitize', function () { assert.equal(text.getAttribute('text-decoration'), 'underline'); }); + + it('Test sanitizeSvg() does not strip word-spacing attribute from text', function () { + const text = document.createElementNS(NS.SVG, 'text'); + text.setAttribute('word-spacing', '10'); + svg.append(text); + + sanitize.sanitizeSvg(text); + + assert.equal(text.getAttribute('word-spacing'), '10'); + }); }); diff --git a/src/editor/images/svg_edit_icons.svg b/src/editor/images/svg_edit_icons.svg index 37b1070b..82f68a7c 100644 --- a/src/editor/images/svg_edit_icons.svg +++ b/src/editor/images/svg_edit_icons.svg @@ -1093,6 +1093,24 @@ + + + + + + + + + + + + Layer 1 + A B + + + + + diff --git a/src/editor/index.html b/src/editor/index.html index fda522c3..a6f4a341 100644 --- a/src/editor/index.html +++ b/src/editor/index.html @@ -344,6 +344,20 @@ +
+ + +