Fuente: https://github.com/chamilo/chamilo-lms/releases/download/v1.11.40/chamilo-1.11.40.zip sha256: 1cf4bf2cc7bae1ef1a1eff643235db1d552f78ddf4b6dd1e2d2dac9868679439 Snapshot independiente (rama huerfana); diffable vs 1.11.38. vendor incluido.
47 lines
913 B
JavaScript
47 lines
913 B
JavaScript
/*globals svgEditor, svgCanvas*/
|
|
/*jslint eqeq: true*/
|
|
/*
|
|
* ext-panning.js
|
|
*
|
|
* Licensed under the MIT License
|
|
*
|
|
* Copyright(c) 2013 Luis Aguirre
|
|
*
|
|
*/
|
|
|
|
/*
|
|
This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem
|
|
*/
|
|
|
|
svgEditor.addExtension('ext-panning', function() {'use strict';
|
|
return {
|
|
name: 'Extension Panning',
|
|
svgicons: svgEditor.curConfig.extPath + 'ext-panning.xml',
|
|
buttons: [{
|
|
id: 'ext-panning',
|
|
type: 'mode',
|
|
title: 'Panning',
|
|
events: {
|
|
click: function() {
|
|
svgCanvas.setMode('ext-panning');
|
|
}
|
|
}
|
|
}],
|
|
mouseDown: function() {
|
|
if (svgCanvas.getMode() == 'ext-panning') {
|
|
svgEditor.setPanning(true);
|
|
return {started: true};
|
|
}
|
|
},
|
|
mouseUp: function() {
|
|
if (svgCanvas.getMode() == 'ext-panning') {
|
|
svgEditor.setPanning(false);
|
|
return {
|
|
keep: false,
|
|
element: null
|
|
};
|
|
}
|
|
}
|
|
};
|
|
});
|