change code style to ffrgb/meshviewer fork

This commit is contained in:
Milan Pässler 2017-03-17 03:14:57 +01:00
commit 418b630e02
42 changed files with 3505 additions and 3154 deletions

View file

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