Minor clean-up
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2813 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -144,7 +144,7 @@ svgEditor.addExtension('view_grid', function() { 'use strict';
|
||||
callback: function () {
|
||||
if (showGrid) {
|
||||
gridUpdate();
|
||||
}
|
||||
}
|
||||
},
|
||||
buttons: [{
|
||||
id: 'view_grid',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
};
|
||||
});
|
||||
|
||||
@@ -138,7 +138,6 @@ svgEditor.addExtension("polygon", function(S) {'use strict';
|
||||
events: {
|
||||
change: function(){
|
||||
setAttr('sides', this.value);
|
||||
|
||||
}
|
||||
}
|
||||
}],
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user