svgedit.js 808 B

12345678910111213141516171819202122232425262728
  1. /*globals $, svgedit*/
  2. /**
  3. *
  4. * Licensed under the MIT License
  5. * main object, loaded first so other modules have the guarantee of its existence
  6. */
  7. svgedit = {
  8. // common namepaces constants in alpha order
  9. NS: {
  10. HTML: 'http://www.w3.org/1999/xhtml',
  11. MATH: 'http://www.w3.org/1998/Math/MathML',
  12. SE: 'http://svg-edit.googlecode.com',
  13. SVG: 'http://www.w3.org/2000/svg',
  14. XLINK: 'http://www.w3.org/1999/xlink',
  15. XML: 'http://www.w3.org/XML/1998/namespace',
  16. XMLNS: 'http://www.w3.org/2000/xmlns/' // see http://www.w3.org/TR/REC-xml-names/#xmlReserved
  17. }
  18. };
  19. // return the svgedit.NS with key values switched and lowercase
  20. svgedit.getReverseNS = function() {'use strict';
  21. var reverseNS = {};
  22. $.each(this.NS, function(name, URI) {
  23. reverseNS[URI] = name.toLowerCase();
  24. });
  25. return reverseNS;
  26. };