fix panning

master
JFH 2021-01-03 17:59:48 +01:00
parent fd813e8dd9
commit cd80be0902
1 changed files with 5 additions and 11 deletions

View File

@ -28,22 +28,16 @@ export default {
const svgEditor = this;
const strings = await loadExtensionTranslation(svgEditor.configObj.pref('lang'));
const {svgCanvas} = svgEditor;
const buttons = [{
const events = {
id: 'ext-panning',
icon: 'panning.png',
type: 'mode',
events: {
click () {
svgCanvas.setMode('ext-panning');
}
click () {
svgCanvas.setMode('ext-panning');
}
}];
};
return {
newUI: true,
name: strings.name,
buttons: strings.buttons.map((button, i) => {
return Object.assign(buttons[i], button);
}),
events,
mouseDown () {
if (svgCanvas.getMode() === 'ext-panning') {
svgEditor.setPanning(true);