Skip to content

Commit

Permalink
Map examples in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Murray committed Mar 24, 2017
1 parent e4e9cf6 commit 924cbee
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions chapter_14/14_zoom_with_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -382,34 +382,18 @@
scaleFactor = 1.5;
break;
case "out":
scaleFactor = 0.5;
scaleFactor = 0.75;
break;
default:
break;
}

//Transition to new zoom transform values
//
//This triggers a zoom event, specifying a new 'zoomIdentity'
//with our new k value (and unchanged x and y values).
//xxxx
//This triggers a zoom event, scaling by 'scaleFactor'
//
map.transition()
.call(zoom.scaleBy, scaleFactor);




//xxxxx
//FIX CENTERING

// .call(zoom.transform, d3.zoomIdentity.translate(-w/2, -h/2).scale(k).translate(w/2 + x, h/2 + y));


// .translate(w/2, h/2)
// .scale(0.25)
// .translate(-center[0], -center[1]));


});

Expand Down

0 comments on commit 924cbee

Please sign in to comment.