Skip to content

Commit

Permalink
Removed unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
anvaka committed Apr 12, 2015
1 parent 0440da1 commit 5ce7281
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/View/renderer.js
Expand Up @@ -73,11 +73,6 @@ function renderer(graph, settings) {
userInteraction = false,
isPaused = false,

viewPortOffset = {
x: 0,
y: 0
},

transform = {
offsetX: 0,
offsetY: 0,
Expand All @@ -103,8 +98,8 @@ function renderer(graph, settings) {
prepareSettings();
prerender();

updateCenter();
initDom();
updateCenter();
listenToEvents();

rendererInitialized = true;
Expand Down Expand Up @@ -267,7 +262,6 @@ function renderer(graph, settings) {
var graphRect = layout.getGraphRect(),
containerSize = getDimension(container);

viewPortOffset.x = viewPortOffset.y = 0;
transform.offsetX = containerSize.width / 2 - (graphRect.x2 + graphRect.x1) / 2;
transform.offsetY = containerSize.height / 2 - (graphRect.y2 + graphRect.y1) / 2;
graphics.graphCenterChanged(transform.offsetX, transform.offsetY);
Expand Down Expand Up @@ -436,8 +430,6 @@ function renderer(graph, settings) {
if (isInteractive('drag')) {
containerDrag = dragndrop(container);
containerDrag.onDrag(function(e, offset) {
viewPortOffset.x += offset.x;
viewPortOffset.y += offset.y;
graphics.translateRel(offset.x, offset.y);

renderGraph();
Expand Down

0 comments on commit 5ce7281

Please sign in to comment.