meraproject/lib/js/bws/svg.js
keboss-m 5c21d25d45 Initial commit: Merakomis portal, Docker stack and user-reader API.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 11:04:05 +03:00

47 lines
998 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

var SVG;
SVG = {
create: function(type, attr) {
var i, l;
l = document.createElementNS('http://www.w3.org/2000/svg', type);
for (i in attr) {
l.setAttribute(i, attr[i]);
}
return l;
},
createSvg: function() {
return SVG.create('svg', {
style: 'width:100%;height:100%',
'xmlns': 'http://www.w3.org/2000/svg'
});
}
};
/*
(($)->
$.fn.SVG = (method)->
if (F[method])
F[method].apply( this, Array.prototype.slice.call(arguments,1) )
else if typeof method == "object" || !method
F.init.apply(this,arguments)
else
$.error('Метод с именем '+method+' не существует для jQuery.SVG')
create:(type,attr)->
l = document.createElementNS('http://www.w3.org/2000/svg',type)
for i of attr
l.setAttribute(i,attr[i])
l
createSvg:->
SVG.create('svg',{style:'width:100%;height:100%','xmlns':'http://www.w3.org/2000/svg'})
F =
init:(x)->
console.log 'init',x
test:(x,y)->
console.log('SVG test',x,y)
)(jQuery)
*/