2018-05-16 00:53:27 +00:00
|
|
|
/* eslint-disable no-var */
|
|
|
|
/* globals $, svgedit:true */
|
2013-02-16 15:02:26 +00:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
* Licensed under the MIT License
|
2014-01-31 01:05:03 +00:00
|
|
|
* main object, loaded first so other modules have the guarantee of its existence
|
2013-02-16 15:02:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
svgedit = {
|
2018-05-18 04:02:30 +00:00
|
|
|
// common namepaces constants in alpha order
|
|
|
|
NS: {
|
|
|
|
HTML: 'http://www.w3.org/1999/xhtml',
|
|
|
|
MATH: 'http://www.w3.org/1998/Math/MathML',
|
|
|
|
SE: 'http://svg-edit.googlecode.com',
|
|
|
|
SVG: 'http://www.w3.org/2000/svg',
|
|
|
|
XLINK: 'http://www.w3.org/1999/xlink',
|
|
|
|
XML: 'http://www.w3.org/XML/1998/namespace',
|
2018-05-18 04:40:50 +00:00
|
|
|
XMLNS: 'http://www.w3.org/2000/xmlns/' // see https://www.w3.org/TR/REC-xml-names/#xmlReserved
|
2018-05-18 04:02:30 +00:00
|
|
|
}
|
2013-02-16 15:02:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// return the svgedit.NS with key values switched and lowercase
|
2018-05-16 00:53:27 +00:00
|
|
|
svgedit.getReverseNS = function () {
|
2018-05-18 04:02:30 +00:00
|
|
|
'use strict';
|
|
|
|
var reverseNS = {};
|
|
|
|
$.each(this.NS, function (name, URI) {
|
|
|
|
reverseNS[URI] = name.toLowerCase();
|
|
|
|
});
|
|
|
|
return reverseNS;
|
2018-05-16 00:53:27 +00:00
|
|
|
};
|