Minor: Avoid internal use of svgEditor, fix comment
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2706 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
e463b43220
commit
51dcf01415
|
@ -167,7 +167,7 @@ svgEditor.addExtension("server_opensave", {
|
||||||
|
|
||||||
|
|
||||||
function submit() {
|
function submit() {
|
||||||
// This submits the form, which returns the file data using svgEditor.uploadSVG
|
// This submits the form, which returns the file data using svgEditor.processFile()
|
||||||
form.submit();
|
form.submit();
|
||||||
|
|
||||||
rebuildInput(form);
|
rebuildInput(form);
|
||||||
|
@ -190,7 +190,7 @@ svgEditor.addExtension("server_opensave", {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
inp.change(function() {
|
inp.change(function() {
|
||||||
// This submits the form, which returns the file data using svgEditor.uploadSVG
|
// This submits the form, which returns the file data using svgEditor.processFile()
|
||||||
submit();
|
submit();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/*globals globalStorage, widget, svgEditor, svgedit, canvg, DOMParser, FileReader, jQuery, $ */
|
/*globals svgEditor:true, globalStorage, widget, svgedit, canvg, jQuery, $, DOMParser, FileReader */
|
||||||
/*jslint vars: true, eqeq: true, todo: true, forin: true, continue: true, regexp: true */
|
/*jslint vars: true, eqeq: true, todo: true, forin: true, continue: true, regexp: true */
|
||||||
/*
|
/*
|
||||||
* svg-editor.js
|
* svg-editor.js
|
||||||
|
@ -9,6 +9,7 @@
|
||||||
* Copyright(c) 2010 Pavol Rusnak
|
* Copyright(c) 2010 Pavol Rusnak
|
||||||
* Copyright(c) 2010 Jeff Schiller
|
* Copyright(c) 2010 Jeff Schiller
|
||||||
* Copyright(c) 2010 Narendra Sisodiya
|
* Copyright(c) 2010 Narendra Sisodiya
|
||||||
|
* Copyright(c) 2014 Brett Zamir
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ TO-DOS
|
||||||
// curPrefs, curConfig, canvas, storage, uiStrings
|
// curPrefs, curConfig, canvas, storage, uiStrings
|
||||||
//
|
//
|
||||||
// STATE MAINTENANCE PROPERTIES
|
// STATE MAINTENANCE PROPERTIES
|
||||||
editor.tool_scale = 1; // Dependent on icon size, so no need to make configurable?
|
editor.tool_scale = 1; // Dependent on icon size, so any use to making configurable instead? Used by JQuerySpinBtn.js
|
||||||
editor.langChanged = false;
|
editor.langChanged = false;
|
||||||
editor.showSaveWarning = false;
|
editor.showSaveWarning = false;
|
||||||
editor.storagePromptClosed = false; // For use with ext-storage.js
|
editor.storagePromptClosed = false; // For use with ext-storage.js
|
||||||
|
@ -465,7 +466,7 @@ TO-DOS
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
svgEditor.setConfig(urldata, {overwrite: false}); // Note: source, url, and paramurl (as with storagePrompt later) are not set on config but are used below
|
editor.setConfig(urldata, {overwrite: false}); // Note: source, url, and paramurl (as with storagePrompt later) are not set on config but are used below
|
||||||
|
|
||||||
setupCurConfig();
|
setupCurConfig();
|
||||||
|
|
||||||
|
@ -489,22 +490,22 @@ TO-DOS
|
||||||
}
|
}
|
||||||
if (qstr.indexOf('paramurl=') !== -1) {
|
if (qstr.indexOf('paramurl=') !== -1) {
|
||||||
// Get parameter URL (use full length of remaining location.href)
|
// Get parameter URL (use full length of remaining location.href)
|
||||||
svgEditor.loadFromURL(qstr.substr(9));
|
editor.loadFromURL(qstr.substr(9));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (urldata.url) {
|
if (urldata.url) {
|
||||||
svgEditor.loadFromURL(urldata.url);
|
editor.loadFromURL(urldata.url);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!urldata.noStorageOnLoad || curConfig.forceStorage) {
|
if (!urldata.noStorageOnLoad || curConfig.forceStorage) {
|
||||||
svgEditor.loadContentAndPrefs();
|
editor.loadContentAndPrefs();
|
||||||
}
|
}
|
||||||
setupCurPrefs();
|
setupCurPrefs();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
setupCurConfig();
|
setupCurConfig();
|
||||||
svgEditor.loadContentAndPrefs();
|
editor.loadContentAndPrefs();
|
||||||
setupCurPrefs();
|
setupCurPrefs();
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
@ -726,7 +727,7 @@ TO-DOS
|
||||||
}
|
}
|
||||||
|
|
||||||
var size = $.pref('iconsize');
|
var size = $.pref('iconsize');
|
||||||
svgEditor.setIconSize(size || ($(window).height() < min_height ? 's': 'm'));
|
editor.setIconSize(size || ($(window).height() < min_height ? 's': 'm'));
|
||||||
|
|
||||||
// Look for any missing flyout icons from plugins
|
// Look for any missing flyout icons from plugins
|
||||||
$('.tools_flyout').each(function() {
|
$('.tools_flyout').each(function() {
|
||||||
|
@ -742,7 +743,7 @@ TO-DOS
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
svgEditor.runCallbacks();
|
editor.runCallbacks();
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('.flyout_arrow_horiz:empty').each(function() {
|
$('.flyout_arrow_horiz:empty').each(function() {
|
||||||
|
@ -3156,7 +3157,7 @@ TO-DOS
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
// Made public for UI customization.
|
// Made public for UI customization.
|
||||||
// TODO: Group UI functions into a public svgEditor.ui interface.
|
// TODO: Group UI functions into a public editor.ui interface.
|
||||||
editor.addDropDown = function(elem, callback, dropUp) {
|
editor.addDropDown = function(elem, callback, dropUp) {
|
||||||
if ($(elem).length == 0) {return;} // Quit if called on non-existant element
|
if ($(elem).length == 0) {return;} // Quit if called on non-existant element
|
||||||
var button = $(elem).find('button');
|
var button = $(elem).find('button');
|
||||||
|
@ -3855,7 +3856,7 @@ TO-DOS
|
||||||
};
|
};
|
||||||
|
|
||||||
$(window).resize(resetScrollPos);
|
$(window).resize(resetScrollPos);
|
||||||
svgEditor.ready(function() {
|
editor.ready(function() {
|
||||||
// TODO: Find better way to detect when to do this to minimize
|
// TODO: Find better way to detect when to do this to minimize
|
||||||
// flickering effect
|
// flickering effect
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
@ -4976,7 +4977,7 @@ TO-DOS
|
||||||
// For Compatibility with older extensions
|
// For Compatibility with older extensions
|
||||||
$(function() {
|
$(function() {
|
||||||
window.svgCanvas = svgCanvas;
|
window.svgCanvas = svgCanvas;
|
||||||
svgCanvas.ready = svgEditor.ready;
|
svgCanvas.ready = editor.ready;
|
||||||
});
|
});
|
||||||
|
|
||||||
editor.setLang = function(lang, allStrings) {
|
editor.setLang = function(lang, allStrings) {
|
||||||
|
|
Loading…
Reference in New Issue