#631 globals svgEditor to get imgpath and set changes

This commit is contained in:
agriyadev5
2021-09-22 12:17:21 +05:30
parent 8df8efedf0
commit b958009e16
23 changed files with 46 additions and 168 deletions

View File

@@ -364,7 +364,6 @@ export default {
svgCanvas.setMode('connector');
}
});
$id('mode_connect').init(svgEditor);
},
/* async */ addLangData({ _lang }) { // , importLocale: importLoc
return {

View File

@@ -94,7 +94,6 @@ export default {
svgCanvas.setMode('eyedropper');
}
});
$id('tool_eyedropper').init(svgEditor);
},
// if we have selected an element, grab its paint and enable the eye dropper button
selectedChanged: getStyle,

View File

@@ -174,7 +174,6 @@ export default {
svgEditor.configObj.curConfig.showGrid = showGrid = !showGrid;
gridUpdate();
});
$id('view_grid').init(svgEditor);
if (showGrid) {
gridUpdate();
}

View File

@@ -530,7 +530,6 @@ export default {
$id('tool_imagelib').addEventListener("click", () => {
showBrowser();
});
$id('tool_imagelib').init(svgEditor);
const style = document.createElement('style');
style.textContent = '#imgbrowse_holder {' +

View File

@@ -174,9 +174,6 @@ export default {
$id("tool_open").addEventListener("click", clickOpen.bind(this));
$id("tool_save").addEventListener("click", clickSave.bind(this, "save"));
$id("tool_save_as").addEventListener("click", clickSave.bind(this, "saveas"));
[ "tool_clear", "tool_open", "tool_save", "tool_save_as" ].forEach((attrId) =>
$id(attrId).init(svgEditor)
);
}
};
}

View File

@@ -57,7 +57,6 @@ export default {
svgCanvas.setMode('ext-panning');
}
});
$id('ext-panning').init(svgEditor);
},
mouseDown() {
if (svgCanvas.getMode() === 'ext-panning') {

View File

@@ -108,10 +108,6 @@ export default {
showPanel(false, "star");
}
});
$id("tool_star").init(svgEditor);
$id("tool_polygon").init(svgEditor);
$id("tools_polygon").init(svgEditor);
const label0 = `${name}:contextTools.0.label`;
const title0 = `${name}:contextTools.0.title`;
const label1 = `${name}:contextTools.1.label`;

View File

@@ -54,7 +54,6 @@ export default {
canv.setMode(modeId);
}
});
$id('tool_shapelib').init(svgEditor);
}
},
mouseDown (opts) {