meshviewer/lib/title.js
Moorviper 115d9abab9 Location Picker
Both
Rightclick and Button
with higher precision
2016-02-25 18:15:24 +01:00

36 lines
635 B
JavaScript
Raw 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.

define(function () {
return function (config) {
function setTitle(d) {
var title = [config.siteName]
if (d !== undefined)
title.push(d)
document.title = title.join(": ")
}
this.resetView = function () {
setTitle()
}
this.gotoNode = function (d) {
if (d)
setTitle(d.nodeinfo.hostname)
}
this.gotoLink = function (d) {
if (d)
setTitle(d.source.node.nodeinfo.hostname + " " + d.target.node.nodeinfo.hostname)
}
this.gotoLocation = function() {
//ignore
}
this.destroy = function () {
}
return this
}
})