Merge pull request #678 from SVG-Edit/update

Fix html for font size
master
JFH 2021-12-11 13:58:32 +01:00 committed by GitHub
commit 6bb447eeee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2322 additions and 1165 deletions

3459
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -71,14 +71,14 @@
"@babel/polyfill": "7.12.1",
"browser-fs-access": "0.23.0",
"canvg": "3.0.9",
"core-js": "3.19.2",
"core-js": "3.19.3",
"elix": "15.0.1",
"html2canvas": "1.3.3",
"i18next": "21.5.4",
"i18next": "21.6.0",
"jspdf": "2.4.0",
"pathseg": "1.2.1",
"regenerator-runtime": "0.13.9",
"rollup-plugin-polyfill-node": "0.7.0",
"rollup-plugin-polyfill-node": "0.8.0",
"svg2pdf.js": "2.2.0"
},
"devDependencies": {
@ -87,7 +87,7 @@
"@babel/register": "7.16.0",
"@babel/runtime-corejs3": "7.16.3",
"@cypress/code-coverage": "3.9.12",
"@cypress/fiddle": "1.19.2",
"@cypress/fiddle": "1.19.3",
"@fintechstudios/eslint-plugin-chai-as-promised": "3.1.0",
"@rollup/plugin-babel": "5.3.0",
"@rollup/plugin-commonjs": "^18",
@ -100,9 +100,9 @@
"@web/dev-server-rollup": "0.3.13",
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
"copyfiles": "2.4.1",
"core-js-bundle": "3.19.2",
"core-js-bundle": "3.19.3",
"cp-cli": "2.0.0",
"cypress": "9.1.0",
"cypress": "9.1.1",
"cypress-multi-reporters": "1.5.0",
"cypress-plugin-snapshots": "1.4.4",
"eslint": "^7",
@ -111,17 +111,17 @@
"eslint-plugin-chai-expect": "3.0.0",
"eslint-plugin-chai-expect-keywords": "2.1.0",
"eslint-plugin-chai-friendly": "0.7.2",
"eslint-plugin-compat": "3.13.0",
"eslint-plugin-compat": "4.0.0",
"eslint-plugin-cypress": "2.12.1",
"eslint-plugin-eslint-comments": "3.2.0",
"eslint-plugin-html": "6.2.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jsdoc": "37.0.3",
"eslint-plugin-jsdoc": "37.2.0",
"eslint-plugin-markdown": "2.2.1",
"eslint-plugin-no-unsanitized": "4.0.0",
"eslint-plugin-no-unsanitized": "4.0.1",
"eslint-plugin-no-use-extend-native": "0.5.0",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-promise": "5.1.1",
"eslint-plugin-promise": "5.2.0",
"eslint-plugin-standard": "4.1.0",
"jamilih": "0.54.0",
"jsdoc": "3.6.7",
@ -133,9 +133,9 @@
"qr-manipulation": "0.7.0",
"query-result": "1.0.5",
"remark-cli": "10.0.1",
"remark-lint-ordered-list-marker-value": "3.1.0",
"remark-lint-ordered-list-marker-value": "3.1.1",
"rimraf": "3.0.2",
"rollup": "2.60.2",
"rollup": "2.61.0",
"rollup-plugin-copy": "3.4.0",
"rollup-plugin-filesize": "9.1.1",
"rollup-plugin-html": "^0.2.1",

View File

@ -133,7 +133,7 @@
<se-button id="tool_italic" title="properties.italic" src="italic.svg" shortcut="I"></se-button>
<se-select id="tool_font_family" label="properties.font_family_label"
options="properties.serif,properties.sans_serif,properties.cursive,properties.fantasy,properties.monospace,properties.courier,properties.helvetica,properties.times"
values="Serif::Sans-serif::Cursive::Fantasy::Monospace::Courier::Helvetica::Times"></select>
values="Serif::Sans-serif::Cursive::Fantasy::Monospace::Courier::Helvetica::Times"></se-select>
<se-spin-input size="2" id="font_size" min=1 max=1000 step=1 title="properties.font_size"
src="fontsize.svg"></se-spin-input>
</div>

View File

@ -703,7 +703,7 @@ export const setFontSizeMethod = function (val) {
const selectedElements = elemContext_.getSelectedElements();
elemContext_.setCurText('font_size', val);
elemContext_.getCanvas().changeSelectedAttribute('font-size', val);
if (!selectedElements[0].textContent) {
if (selectedElements[0] && !selectedElements[0].textContent) {
elemContext_.getCanvas().textActions.setCursor();
}
};