From cc780f39e66c97fb5a9e2eaabec516d7ff604847 Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 11 Feb 2014 00:05:17 +0000 Subject: [PATCH] Document $.pref git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2683 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svg-editor.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/editor/svg-editor.js b/editor/svg-editor.js index e5522809..5af46827 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -130,7 +130,12 @@ Editor.curConfig = curConfig; Editor.tool_scale = 1; - // Store and retrieve preferences + /** + * Store and retrieve preferences + * @param {string} key + * @param {string} [val] The value. If the value supplied is null or undefined, no change to the preference will be made. + * @returns {string} If val is not present (or is null or undefined), the value of the previously stored preference will be returned. + */ $.pref = function(key, val) { if (val) { curPrefs[key] = val;