group each plugin in its own folder

This commit is contained in:
jfh
2020-09-06 08:32:10 +02:00
parent caa4fe38cc
commit cfb3620d3a
322 changed files with 519 additions and 956 deletions

View File

@@ -0,0 +1,55 @@
/**
* @file ext-panning.js
*
* @license MIT
*
* @copyright 2013 Luis Aguirre
*
*/
/*
This is a very basic SVG-Edit extension to let tablet/mobile devices pan without problem
*/
export default {
name: 'panning',
async init ({importLocale}) {
const svgEditor = this;
// eslint-disable-next-line node/no-unsupported-features/es-syntax
const {default: strings} = await import(`./locale/${svgEditor.curPrefs.lang}.js`);
const svgCanvas = svgEditor.canvas;
const buttons = [{
id: 'ext-panning',
icon: 'panning.png',
type: 'mode',
events: {
click () {
svgCanvas.setMode('ext-panning');
}
}
}];
return {
name: strings.name,
svgicons: 'ext-panning.xml',
buttons: strings.buttons.map((button, i) => {
return Object.assign(buttons[i], button);
}),
mouseDown () {
if (svgCanvas.getMode() === 'ext-panning') {
svgEditor.setPanning(true);
return {started: true};
}
return undefined;
},
mouseUp () {
if (svgCanvas.getMode() === 'ext-panning') {
svgEditor.setPanning(false);
return {
keep: false,
element: null
};
}
return undefined;
}
};
}
};

View File

@@ -0,0 +1,8 @@
export default {
name: 'Extension Panning',
buttons: [
{
title: 'Panning'
}
]
};

View File

@@ -0,0 +1,8 @@
export default {
name: '移动',
buttons: [
{
title: '移动'
}
]
};