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.
37 lines
871 B
37 lines
871 B
var Class = require('../../core/class'); |
|
var Container = require('../../dom/container'); |
|
var Node = require('./node'); |
|
|
|
module.exports = Class(Node, Container, { |
|
|
|
initialize: function(width, height){ |
|
this.width = width; |
|
this.height = height; |
|
}, |
|
|
|
localHitTest: function(x, y) { |
|
var node = this.lastChild; |
|
while (node){ |
|
var hit = node.hitTest(x, y); |
|
if (hit) return hit; |
|
node = node.previousSibling; |
|
} |
|
return null; |
|
}, |
|
|
|
renderLayerTo: function(context, xx, yx, xy, yy, x, y) { |
|
context.setTransform(xx, yx, xy, yy, x, y); |
|
context.save(); |
|
// Need beginPath to fix Firefox bug. See 3354054. |
|
context.beginPath(); |
|
context.rect(this.x, this.y, this.width, this.height); |
|
context.clip(); |
|
|
|
var node = this.firstChild; |
|
while(node) { |
|
node.renderTo(context, xx, yx, xy, yy, x, y); |
|
node = node.nextSibling; |
|
} |
|
context.restore(); |
|
} |
|
});
|
|
|