From 8c5976f488b454ecbe2cfca1372e8089738d0326 Mon Sep 17 00:00:00 2001 From: Bruno Heridet Date: Sat, 16 Feb 2013 11:21:06 +0000 Subject: [PATCH] fixed formatting in panning extension git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2407 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/extensions/ext-panning.js | 60 +++++++++++++++----------------- 1 file changed, 28 insertions(+), 32 deletions(-) diff --git a/editor/extensions/ext-panning.js b/editor/extensions/ext-panning.js index 89cf73a7..8506a4ab 100644 --- a/editor/extensions/ext-panning.js +++ b/editor/extensions/ext-panning.js @@ -10,39 +10,35 @@ /* This is a very basic SVG-Edit extension to let tablet/mobile devices panning without problem */ - -svgEditor.addExtension("ext-panning", function() { - return { - name: "Extension Panning", - svgicons: "extensions/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(opts) { - if(svgCanvas.getMode() == "ext-panning") { - svgEditor.setPanning(false); - return { - keep: false, - element: null - } +svgEditor.addExtension('ext-panning', function() { + return { + name: 'Extension Panning', + svgicons: 'extensions/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 + }; + } + } + }; }); -