fix file-open handle (#717)
* review svg-exec * review selection.js elemgetset and selectedelems * Update svgcanvas.js * remember handle after open, send events * update dependenciesmaster
parent
77646cd14e
commit
5d1ba0205b
File diff suppressed because it is too large
Load Diff
32
package.json
32
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "svgedit",
|
||||
"version": "7.1.1",
|
||||
"version": "7.1.2",
|
||||
"description": "Powerful SVG-Editor for your browser ",
|
||||
"main": "dist/Editor.js",
|
||||
"module": "dist/Editor.js",
|
||||
|
@ -82,12 +82,12 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@babel/polyfill": "7.12.1",
|
||||
"browser-fs-access": "0.23.0",
|
||||
"browser-fs-access": "0.24.0",
|
||||
"canvg": "3.0.9",
|
||||
"core-js": "3.20.1",
|
||||
"core-js": "3.20.3",
|
||||
"elix": "15.0.1",
|
||||
"html2canvas": "1.3.4",
|
||||
"i18next": "21.6.4",
|
||||
"html2canvas": "1.4.1",
|
||||
"i18next": "21.6.7",
|
||||
"jspdf": "2.5.0",
|
||||
"pathseg": "1.2.1",
|
||||
"regenerator-runtime": "0.13.9",
|
||||
|
@ -95,29 +95,29 @@
|
|||
"svg2pdf.js": "2.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.16.7",
|
||||
"@babel/preset-env": "7.16.7",
|
||||
"@babel/register": "7.16.7",
|
||||
"@babel/runtime-corejs3": "7.16.7",
|
||||
"@babel/core": "7.16.12",
|
||||
"@babel/preset-env": "7.16.11",
|
||||
"@babel/register": "7.16.9",
|
||||
"@babel/runtime-corejs3": "7.16.8",
|
||||
"@cypress/code-coverage": "3.9.12",
|
||||
"@cypress/fiddle": "1.19.3",
|
||||
"@rollup/plugin-babel": "5.3.0",
|
||||
"@rollup/plugin-commonjs": "^18",
|
||||
"@rollup/plugin-dynamic-import-vars": "1.4.2",
|
||||
"@rollup/plugin-node-resolve": "13.1.1",
|
||||
"@rollup/plugin-node-resolve": "13.1.3",
|
||||
"@rollup/plugin-replace": "3.0.1",
|
||||
"@rollup/plugin-url": "6.1.0",
|
||||
"@web/dev-server": "0.1.29",
|
||||
"@web/dev-server-rollup": "0.3.13",
|
||||
"@web/dev-server-rollup": "0.3.14",
|
||||
"babel-plugin-transform-object-rest-spread": "7.0.0-beta.3",
|
||||
"copyfiles": "2.4.1",
|
||||
"core-js-bundle": "3.20.1",
|
||||
"core-js-bundle": "3.20.3",
|
||||
"cp-cli": "2.0.0",
|
||||
"cypress": "9.2.0",
|
||||
"cypress": "9.3.1",
|
||||
"cypress-multi-reporters": "1.5.0",
|
||||
"cypress-plugin-snapshots": "1.4.4",
|
||||
"jamilih": "0.54.0",
|
||||
"jsdoc": "3.6.7",
|
||||
"jsdoc": "3.6.9",
|
||||
"node-static": "0.7.11",
|
||||
"npm-run-all": "4.1.5",
|
||||
"nyc": "15.1.0",
|
||||
|
@ -128,9 +128,9 @@
|
|||
"remark-cli": "10.0.1",
|
||||
"remark-lint-ordered-list-marker-value": "3.1.1",
|
||||
"rimraf": "3.0.2",
|
||||
"rollup": "2.62.0",
|
||||
"rollup": "2.66.0",
|
||||
"rollup-plugin-copy": "3.4.0",
|
||||
"rollup-plugin-filesize": "9.1.1",
|
||||
"rollup-plugin-filesize": "9.1.2",
|
||||
"rollup-plugin-html": "^0.2.1",
|
||||
"rollup-plugin-node-polyfills": "0.2.1",
|
||||
"rollup-plugin-progress": "1.1.2",
|
||||
|
|
|
@ -159,13 +159,19 @@ export default {
|
|||
const svgContent = await blob.text()
|
||||
await svgEditor.loadSvgString(svgContent)
|
||||
svgEditor.updateCanvas()
|
||||
handle = blob.handle
|
||||
svgEditor.svgCanvas.runExtensions('onOpenedDocument', {
|
||||
name: blob.name,
|
||||
lastModified: blob.lastModified,
|
||||
size: blob.size,
|
||||
type: blob.type
|
||||
})
|
||||
} catch (err) {
|
||||
if (err.name !== 'AbortError') {
|
||||
return console.error(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const b64toBlob = (b64Data, contentType = '', sliceSize = 512) => {
|
||||
const byteCharacters = atob(b64Data)
|
||||
const byteArrays = []
|
||||
|
@ -225,6 +231,10 @@ export default {
|
|||
extensions: ['.svg']
|
||||
})
|
||||
}
|
||||
svgCanvas.runExtensions('onSavedDocument', {
|
||||
name: handle.name,
|
||||
kind: handle.kind
|
||||
})
|
||||
} catch (err) {
|
||||
if (err.name !== 'AbortError') {
|
||||
return console.error(err)
|
||||
|
|
Loading…
Reference in New Issue