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.
41 lines
1.1 KiB
41 lines
1.1 KiB
var Class = require('../../core/class'); |
|
var Container = require('../../dom/container'); |
|
var Element = require('../../dom/native'); |
|
var DOM = require('./dom'); |
|
|
|
var precision = 100; |
|
|
|
var VMLSurface = Class(Element, Container, { |
|
|
|
initialize: function VMLSurface(width, height, existingElement){ |
|
this.element = existingElement || document.createElement('vml'); |
|
this.containerElement = DOM.createElement('group'); |
|
this.element.appendChild(this.containerElement); |
|
if (width != null && height != null) this.resize(width, height); |
|
}, |
|
|
|
resize: function(width, height){ |
|
this.width = width; |
|
this.height = height; |
|
|
|
var style = this.element.style; |
|
style.pixelWidth = width; |
|
style.pixelHeight = height; |
|
|
|
style = this.containerElement.style; |
|
style.width = width; |
|
style.height = height; |
|
|
|
var halfPixel = (0.5 * precision); |
|
|
|
this.containerElement.coordorigin = halfPixel + ',' + halfPixel; |
|
this.containerElement.coordsize = (width * precision) + ',' + (height * precision); |
|
|
|
return this; |
|
} |
|
|
|
}); |
|
|
|
VMLSurface.tagName = 'av:vml'; |
|
|
|
module.exports = VMLSurface; |