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