This app provides monitoring and information features for the common freifunk user and the technical stuff of a freifunk community. Code base is taken from a TUM Practical Course project and added here to see if Freifunk Altdorf can use it. https://www.freifunk-altdorf.de
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
856 B

var Class = require('../../core/class');
var Container = require('../../dom/container');
var Element = require('../../dom/native');
var DOM = require('./dom');
var SVGSurface = Class(Element, Container, {
initialize: function SVGSurface(width, height, existingElement){
var element = this.element = existingElement || DOM.createElement('svg');
element.setAttribute('xmlns', DOM.NS);
element.setAttribute('version', 1.1);
var defs = this.defs = DOM.createElement('defs');
element.appendChild(defs);
if (width != null && height != null) this.resize(width, height);
},
resize: function(width, height){
var element = this.element;
element.setAttribute('width', width);
element.setAttribute('height', height);
this.width = width;
this.height = height;
return this;
}
});
SVGSurface.tagName = 'svg';
module.exports = SVGSurface;