- npm: Alphabetize scripts

- JSDoc: Exclude svgedit config files
- JSDoc: Convert remaining items in old format to JSDoc (as could easily be found)
This commit is contained in:
Brett Zamir
2018-05-29 20:31:24 +08:00
parent fb413a8e9f
commit dc79fe7fde
14 changed files with 804 additions and 825 deletions

View File

@@ -45,15 +45,12 @@ svgEditor.addExtension('foreignObject', function (S) {
newFO,
editingforeign = false;
// Function: setForeignString(xmlString, elt)
// This function sets the content of element elt to the input XML.
//
// Parameters:
// xmlString - The XML text.
// elt - the parent element to append to
//
// Returns:
// This function returns false if the set was unsuccessful, true otherwise.
/**
* This function sets the content of element elt to the input XML.
* @param {String} xmlString - The XML text.
* @param elt - the parent element to append to
* @returns {Boolean} This function returns false if the set was unsuccessful, true otherwise.
*/
function setForeignString (xmlString) {
const elt = selElems[0];
try {

View File

@@ -103,9 +103,11 @@ svgEditor.addExtension('Markers', function (S) {
markerTypes[v + '_o'] = markerTypes[v];
});
// elem = a graphic element will have an attribute like marker-start
// attr - marker-start, marker-mid, or marker-end
// returns the marker element that is linked to the graphic element
/**
* @param elem - A graphic element will have an attribute like marker-start
* @param attr - marker-start, marker-mid, or marker-end
* @returns The marker element that is linked to the graphic element
*/
function getLinked (elem, attr) {
const str = elem.getAttribute(attr);
if (!str) { return null; }