V7 preview (#480)

* #issue-fix The new menu will ask if you want to erase the current content but it will ignore the answer

* #issue-fix  dialog needs to be closer than the original

* #issue-fix main menu alignment changes

* #issue_fix double click and opensvg issue fixed

* #issue-fix process_cancel change to seConfirm

* #issue-fix review how the top toolbar display when many buttons are displayed

* #issue-fix unwanted css reoved

* #issue-fix BOTTOM TOOLS Make sure all features of the bottom toolbar are working

* #issue-fix IMPORT IMAGE menu open issue fixed

* #issue-fix alert dialog overwrite style

* #issue-fix lint issue fixed

* npm update + associated fixes

* #36 look of opacity button should like the zoom button (without the dropdown button)

* #37 Clicking anywhere on the bottom bar (for example below the opacity button is displaying the “color popup”.)

* #38 The opacity button does not update with the current element

* #42 When you import an image, it works well but the dialog should disappear automatically

* Fixes #53: 4th option for the background display fixed

* Fixes #53: 4th option for the background fixed

* #49 the x button does not work

* Fixes #41: Alignment fixes in bottom bar

* fix test scenario

* #39 opacity button/stroke size/radius button don’t allow the 0 value

* #41 The look and alignment of stroke size and stroke style should be consistent with the rest of the bottom bar.

* #44 Text font dropdown is broken

* #52 Fix the export

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Fixes #44: Text font dropdown fixed

* Update index.html

* update husky

* fixes

* moves from index.html to js

* fix #66

* fix #48 first set of new icons

* Reorganize tools in left panel to be more intuitive

* Update button styles to adapt to new icons

* Fix #48 new set of icons for alignments

* Variabilisation of icon bkgd colors
Update of color choice to fit new icons design

* Update canvas and rulers colors

* Improve layer handle design

* Modernize SVG Logo but keeping original spirit

* Fix #48 continue improve icons

* Continue to reorganise left panel

* Update right panel handle for layers

* Fix #48 new set of icons for main menu

* Improve main menu design

* Rework menu organisation

* Rework menu organisation

* Update input element design

* New icons

* Improve Zoom Module

* Improve Color Picker Module

* New icons

* New icons

* #65 restore the feature of start/end marker lines partially did

* #64 The export dialog needs to include the quality options (except for PDF)

* #39 opacity button/stroke size/radius button don’t allow the 0 value

* #39 eslint changes

* #69 menu button style overwrite

* #65 restore the feature of start/end marker lines

* #43 With a small window, the look of the top toolbar is broken

* #43 tool top alignment revert

* #46 Move this jQuery component to a web component  for graduate and picker components

* #46 Move this jQuery component to a web component

* remove some non standard lint rules

* #46 picker convert as pure javascript changes

* #46 jquery plugin convert to pure javascript

* #46 jquery plugin change to pure javascript

* #46 jquery remove and convert to pure javascript

* #46 slider issue fixed

* #46 ColorValuePicker and js convertion

* #46 globals $ remov from slider class

* #46 jquery convert pure javascript changes

* #46 jquery to js convertion changes

* #46 paintbox and current element color set issue fixed

* #46 unwanted files removed

* #46 $.extend modify changes

* #46 extend modifiey changes

* #46 $.extend change to pure javascript

* #46 extend and data changes

* #46 jquery removed

* #45 These buttons don't work and dropdown is broken

* #45 These buttons don't work and dropdown is broken

* #45 These buttons don't work and dropdown is broken commit reverted

* #43 With a small window, the look of the top toolbar is broken

* Update jQuery.jPicker.js

* #76 draggable modification changes

* #76 jquery-ui-1.8.17.custom.min.js removed from editor

* #76 jquery ui file removed

* npm update

* #77 console issue fixed

* #77 <SVG> button issue fixed

* #77 shortkey issue fixed

* #77 jquery hotkeys plugin changes

* #77 hotkey plugin related changes

* #78 hotkey related code comment.

* #78 js-hotkeys/jquery.hotkeys.min.js file removed from svgedit.js

* #51 Rewrite the color palette without elix

* #81 unwanted files removed

* #81 folder name renamed

* #81 folder rename changes

* #81 jquery-ui  folder renamed

* #81 jquery modify changes

* #81 globals $ removed

Co-authored-by: Agriya Dev5 <agriya.dev5@agriya.in>
Co-authored-by: mathieucura <mathieu@optimistik.fr>
This commit is contained in:
JFH
2021-03-05 12:45:07 +01:00
committed by GitHub
parent 974a4729ec
commit 1af0cd0572
419 changed files with 10798 additions and 11105 deletions

View File

@@ -91,7 +91,7 @@ exports[`use various parts of svg-edit > check tool_text #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -137,7 +137,7 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -152,7 +152,7 @@ exports[`use various parts of svg-edit > check tool_clone #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -199,7 +199,7 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -215,7 +215,7 @@ exports[`use various parts of svg-edit > check tool_italic #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -263,7 +263,7 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -280,7 +280,7 @@ exports[`use various parts of svg-edit > check tool_bold #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -328,7 +328,7 @@ exports[`use various parts of svg-edit > check change color #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -345,7 +345,7 @@ exports[`use various parts of svg-edit > check change color #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -485,7 +485,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -502,7 +502,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -514,7 +514,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
</text>
<polygon
cx="407"
cy="45"
cy="60"
id="svg_3"
shape="star"
point="5"
@@ -525,7 +525,7 @@ exports[`use various parts of svg-edit > check tool_star #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
stroke="#000000"
stroke-width="0"
>
@@ -576,7 +576,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -593,7 +593,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -605,7 +605,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
</text>
<polygon
cx="407"
cy="45"
cy="60"
id="svg_3"
shape="star"
point="5"
@@ -616,7 +616,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
stroke="#000000"
stroke-width="0"
style="pointer-events:inherit"
@@ -625,7 +625,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
></polygon>
<polygon
cx="457"
cy="95"
cy="110"
id="svg_4"
shape="regularPoly"
sides="5"
@@ -634,7 +634,7 @@ exports[`use various parts of svg-edit > check tool_polygon #0`] = `
fill="#000000"
strokecolor="#000000"
strokeWidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
stroke="#000000"
stroke-width="5"
>
@@ -684,7 +684,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -701,7 +701,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -713,7 +713,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
</text>
<polygon
cx="407"
cy="45"
cy="60"
id="svg_3"
shape="star"
point="5"
@@ -724,7 +724,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@@ -732,7 +732,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
></polygon>
<polygon
cx="457"
cy="95"
cy="110"
id="svg_4"
shape="regularPoly"
sides="5"
@@ -741,7 +741,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_start #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
@@ -805,7 +805,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -822,7 +822,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -834,7 +834,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
</text>
<polygon
cx="407"
cy="45"
cy="60"
id="svg_3"
shape="star"
point="5"
@@ -845,7 +845,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@@ -853,7 +853,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
></polygon>
<polygon
cx="457"
cy="95"
cy="110"
id="svg_4"
shape="regularPoly"
sides="5"
@@ -862,7 +862,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_middle #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"
@@ -941,7 +941,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
y="87"
id="svg_1"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -958,7 +958,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
x="136"
y="107"
font-size="24"
font-family="serif"
font-family="Serif"
text-anchor="middle"
xml:space="preserve"
fill-opacity="1"
@@ -970,7 +970,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
</text>
<polygon
cx="407"
cy="45"
cy="60"
id="svg_3"
shape="star"
point="5"
@@ -981,7 +981,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="0"
points="407,31.666666666666664 410.1348546788932,40.68524269666695 419.68075355060205,40.87977340833403 412.0723014202408,46.64809063666639 414.83713669723295,55.78689325833263 407,50.333333333333336 399.16286330276705,55.78689325833263 401.9276985797592,46.64809063666639 394.31924644939795,40.87977340833404 403.8651453211068,40.68524269666695 407,31.666666666666664 410.1348546788932,40.68524269666695 "
points="407,46.666666666666664 410.1348546788932,55.68524269666695 419.68075355060205,55.87977340833403 412.0723014202408,61.64809063666639 414.83713669723295,70.78689325833264 407,65.33333333333333 399.16286330276705,70.78689325833264 401.9276985797592,61.64809063666639 394.31924644939795,55.87977340833404 403.8651453211068,55.68524269666695 407,46.666666666666664 410.1348546788932,55.68524269666695 "
stroke="#000000"
stroke-width="0"
fill-opacity="1"
@@ -989,7 +989,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
></polygon>
<polygon
cx="457"
cy="95"
cy="110"
id="svg_4"
shape="regularPoly"
sides="5"
@@ -998,7 +998,7 @@ exports[`use various parts of svg-edit > check tool_text_anchor_end #0`] = `
fill="#000000"
strokecolor="#000000"
strokewidth="5"
points="462.6710053890136,95 458.7524370403971,100.39344662916632 452.4120602650961,98.33333333333333 452.4120602650961,91.66666666666667 458.7524370403971,89.60655337083368 462.6710053890136,95 "
points="462.6710053890136,110 458.7524370403971,115.39344662916632 452.4120602650961,113.33333333333333 452.4120602650961,106.66666666666667 458.7524370403971,104.60655337083368 462.6710053890136,110 "
stroke="#000000"
stroke-width="5"
fill-opacity="1"

View File

@@ -30,6 +30,6 @@ describe('Fix issue 407', function () {
.dblclick({force: true});
// svgedit use the #text text field to capture the text
cy.get('#text').type('1234', {force: true});
cy.get('#a_text').should('have.text', 'hell1234o');
cy.get('#a_text').should('have.text', 'he1234llo');
});
});

View File

@@ -37,13 +37,13 @@ describe('select', function () {
element: 'svg',
attr: {id: 'svgroot'}
});
svgcontent = svgroot.appendChild(
mockFactory.createSVGElement({
element: 'svg',
attr: {id: 'svgcontent'}
})
);
/* const rect = */ svgcontent.appendChild(
svgcontent = mockFactory.createSVGElement({
element: 'svg',
attr: {id: 'svgcontent'}
});
svgroot.append(svgcontent);
/* const rect = */ svgcontent.append(
mockFactory.createSVGElement({
element: 'rect',
attr: {

View File

@@ -26,10 +26,13 @@ describe('svgtransformlist', function () {
svgroot.style.visibility = 'hidden';
document.body.append(svgroot);
svgcontent = svgroot.appendChild(document.createElementNS(NS.SVG, 'svg'));
rect = svgcontent.appendChild(document.createElementNS(NS.SVG, 'rect'));
svgcontent = document.createElementNS(NS.SVG, 'svg');
svgroot.append(svgcontent);
rect = document.createElementNS(NS.SVG, 'rect');
svgcontent.append(rect);
rect.id = 'r';
circle = svgcontent.appendChild(document.createElementNS(NS.SVG, 'circle'));
circle = document.createElementNS(NS.SVG, 'circle');
svgcontent.append(circle);
circle.id = 'c';
});

View File

@@ -211,7 +211,6 @@ describe('utilities performance', function () {
assert.isBelow(ave, 20, 'svgedit.utilities.getStrokedBBox average execution time is less than 20 ms');
console.log('Pass1 svgCanvas.getStrokedBBox total ms ' + total + ', ave ms ' + ave.toFixed(1) + ',\t min/max ' + min + ' ' + max);
// eslint-disable-next-line promise/avoid-new
return new Promise((resolve) => {
// The second pass is two to ten times faster.
setTimeout(function () {