make eslint happy

This commit is contained in:
Nils Schneider 2015-03-31 21:31:06 +02:00
parent 48147eb417
commit 980187193f

View file

@ -5,6 +5,7 @@ define(["d3"], function (d3) {
var nodesDict, linksDict
var zoomBehavior
var force
var el
function nodeName(d) {
if (d.node && d.node.nodeinfo)
@ -29,6 +30,15 @@ define(["d3"], function (d3) {
d.fixed &= 1
}
function animatePanzoom(translate, scale) {
zoomBehavior.scale(scale)
zoomBehavior.translate(translate)
vis.transition().duration(500)
.attr("transform", "translate(" + translate + ") " +
"scale(" + scale + ")")
}
function panzoom() {
var translate = zoomBehavior.translate()
var scale = zoomBehavior.scale()
@ -56,15 +66,6 @@ define(["d3"], function (d3) {
animatePanzoom(translate, scale)
}
function animatePanzoom(translate, scale) {
zoomBehavior.scale(scale)
zoomBehavior.translate(translate)
vis.transition().duration(500)
.attr("transform", "translate(" + translate + ") " +
"scale(" + scale + ")")
}
function resize() {
var sidebarWidth = sidebar.getWidth()
var width = el.offsetWidth - sidebarWidth
@ -91,12 +92,12 @@ define(["d3"], function (d3) {
})
}
var el = document.createElement("div")
el = document.createElement("div")
el.classList.add("graph")
self.div = el
zoomBehavior = d3.behavior.zoom()
.scaleExtent([1/3, 3])
.scaleExtent([1 / 3, 3])
.on("zoom", panzoom)
vis = d3.select(el).append("svg")
@ -232,8 +233,6 @@ define(["d3"], function (d3) {
node.classed("highlight", false)
link.classed("highlight", false)
var size = force.size()
animatePanzoom([sidebar.getWidth(), 0], 1)
}