diff --git a/editor/extensions/ext-grid.js b/editor/extensions/ext-grid.js index 3def989d..a4148da7 100644 --- a/editor/extensions/ext-grid.js +++ b/editor/extensions/ext-grid.js @@ -144,7 +144,7 @@ svgEditor.addExtension('view_grid', function() { 'use strict'; callback: function () { if (showGrid) { gridUpdate(); - } + } }, buttons: [{ id: 'view_grid', diff --git a/editor/extensions/ext-helloworld.js b/editor/extensions/ext-helloworld.js index ab6608a3..eb67efce 100644 --- a/editor/extensions/ext-helloworld.js +++ b/editor/extensions/ext-helloworld.js @@ -20,7 +20,7 @@ svgEditor.addExtension("Hello World", function() {'use strict'; return { name: "Hello World", // For more notes on how to make an icon file, see the source of - // the hellorworld-icon.xml + // the helloworld-icon.xml svgicons: svgEditor.curConfig.extPath + "helloworld-icon.xml", // Multiple buttons can be added in this array diff --git a/editor/extensions/ext-mathjax.js b/editor/extensions/ext-mathjax.js index 6d6e9944..99527a70 100644 --- a/editor/extensions/ext-mathjax.js +++ b/editor/extensions/ext-mathjax.js @@ -115,14 +115,14 @@ svgEditor.addExtension("mathjax", function() {'use strict'; } return { - name: "MatJax", + name: "MathJax", svgicons: svgEditor.curConfig.extPath + "mathjax-icons.xml", buttons: [{ id: "tool_mathjax", type: "mode", title: "Add Mathematics", events: { - 'click': function() { + click: function() { // Only load Mathjax when needed, we don't want to strain Svg-Edit any more. // From this point on it is very probable that it will be needed, so load it. if (mathjaxLoaded === false) { diff --git a/editor/extensions/ext-overview_window.js b/editor/extensions/ext-overview_window.js index 68101583..d391ee4a 100644 --- a/editor/extensions/ext-overview_window.js +++ b/editor/extensions/ext-overview_window.js @@ -134,9 +134,9 @@ svgEditor.addExtension("overview_window", function() { 'use strict'; updateViewPortFromViewBox(); }); - return{ + return { name: "overview window", - canvasUpdated:updateViewDimensions, - workareaResized:updateViewBox + canvasUpdated: updateViewDimensions, + workareaResized: updateViewBox }; }); diff --git a/editor/extensions/ext-polygon.js b/editor/extensions/ext-polygon.js index c8c5cc32..bea5902e 100644 --- a/editor/extensions/ext-polygon.js +++ b/editor/extensions/ext-polygon.js @@ -138,7 +138,6 @@ svgEditor.addExtension("polygon", function(S) {'use strict'; events: { change: function(){ setAttr('sides', this.value); - } } }], diff --git a/editor/extensions/ext-shapes.js b/editor/extensions/ext-shapes.js index 9784ad19..bf625290 100644 --- a/editor/extensions/ext-shapes.js +++ b/editor/extensions/ext-shapes.js @@ -248,7 +248,7 @@ svgEditor.addExtension('shapes', function() {'use strict'; start_y = opts.start_y; var y = start_y; var cur_style = canv.getStyle(); - + startClientPos.x = opts.event.clientX; startClientPos.y = opts.event.clientY; @@ -343,8 +343,8 @@ svgEditor.addExtension('shapes', function() {'use strict'; mouseUp: function(opts) { var mode = canv.getMode(); if (mode !== mode_id) {return;} - - var keepObject = (opts.event.clientX != startClientPos.x && opts.event.clientY != startClientPos.y); + + var keepObject = (opts.event.clientX != startClientPos.x && opts.event.clientY != startClientPos.y); return { keep: keepObject, diff --git a/editor/locale/locale.js b/editor/locale/locale.js index 49094640..f278a6bd 100644 --- a/editor/locale/locale.js +++ b/editor/locale/locale.js @@ -55,7 +55,7 @@ var svgEditor = (function($, editor) {'use strict'; } editor.readLang = function(langData) { - var more = editor.canvas.runExtensions("addlangData", lang_param, true); + var more = editor.canvas.runExtensions('addlangData', lang_param, true); $.each(more, function(i, m) { if (m.data) { langData = $.merge(langData, m.data); diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 98304a12..6a6fb606 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -2591,7 +2591,7 @@ TODOS + '' + tool.label + ':' + ''; + + '" size="' + (tool.size || '4') + '" value="' + (tool.defval || '') + '" type="text"/>'; // Creates the tool, hides & adds it, returns the select element @@ -2775,12 +2775,12 @@ TODOS // TODO: Find way to set the current icon using the iconloader if this is not default // Include data for extension button as well as ref button - cur_h = holders['#'+flyout_holder[0].id] = [{ - sel: '#'+id, + cur_h = holders['#' + flyout_holder[0].id] = [{ + sel: '#' + id, fn: btn.events.click, icon: btn.id, key: btn.key, - isDefault: btn.includeWith?btn.includeWith.isDefault:0 + isDefault: btn.includeWith ? btn.includeWith.isDefault : 0 }, ref_data]; // {sel:'#tool_rect', fn: clickRect, evt: 'mouseup', key: 4, parent: '#tools_rect', icon: 'rect'} @@ -4346,7 +4346,7 @@ TODOS $('#layerpanel').width('+=' + delta); rulerX.css('right', parseInt(rulerX.css('right'), 10) + delta); workarea.css('right', parseInt(workarea.css('right'), 10) + delta); - svgCanvas.runExtensions("workareaResized"); + svgCanvas.runExtensions('workareaResized'); }; var resizeSidePanel = function(evt) { diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 402da330..44cb3b0e 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -7636,7 +7636,7 @@ this.updateCanvas = function(w, h) { } selectorManager.selectorParentGroup.setAttribute('transform', 'translate(' + x + ',' + y + ')'); - runExtensions('canvasUpdated',{new_x:x, new_y:y, old_x:old_x, old_y:old_y, d_x:x - old_x, d_y:y - old_y}); + runExtensions('canvasUpdated', {new_x:x, new_y:y, old_x:old_x, old_y:old_y, d_x:x - old_x, d_y:y - old_y}); return {x:x, y:y, old_x:old_x, old_y:old_y, d_x:x - old_x, d_y:y - old_y}; };