remove change image and minor refactoring

This commit is contained in:
JFH
2021-08-13 14:37:55 +02:00
parent 57c43e441f
commit b50fe0aee1
12 changed files with 125 additions and 128 deletions

View File

@@ -32,7 +32,7 @@ export default {
await loadExtensionTranslation(svgEditor);
const { svgCanvas } = svgEditor;
const { $id } = svgCanvas;
const svgdoc = document.getElementById('svgcanvas').ownerDocument;
const svgdoc = $id('svgcanvas').ownerDocument;
const { assignAttributes } = svgCanvas;
const hcanvas = document.createElement('canvas');
const canvBG = $id('canvasBackground');
@@ -154,7 +154,7 @@ export default {
updateGrid(svgCanvas.getZoom());
}
$id('canvasGrid').style.display = (showGrid) ? 'block' : 'none';
document.getElementById('view_grid').pressed = showGrid;
$id('view_grid').pressed = showGrid;
};
return {
name: svgEditor.i18next.t(`${name}:name`),