- Refactoring: Destructuring, templates, label Unicode code point

- npm: Rename `build-doc` to `build-docs`; add `open-docs` script
This commit is contained in:
Brett Zamir
2019-04-08 10:50:50 +08:00
parent 91c0dc549b
commit 0c1ddd44fa
18 changed files with 290 additions and 243 deletions

View File

@@ -5,7 +5,10 @@ export default {
name: 'php_savefile',
init ({$}) {
const svgEditor = this;
const svgCanvas = svgEditor.canvas;
const {
curConfig: {extPath},
canvas: svgCanvas
} = svgEditor;
/**
* Get file name out of SVGEdit document title.
* @returns {string}
@@ -14,7 +17,7 @@ export default {
const title = svgCanvas.getDocumentTitle();
return title.trim();
}
const saveSvgAction = svgEditor.curConfig.extPath + 'savefile.php';
const saveSvgAction = extPath + 'savefile.php';
svgEditor.setCustomHandlers({
save (win, data) {
const svg = '<?xml version="1.0" encoding="UTF-8"?>\n' + data,