Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove zoom-pan-transform example.

  • Loading branch information...
commit e56f2175b3fee06576043b65d3390bcaf929ecf3 1 parent 42b17f9
@mbostock authored
Showing with 0 additions and 62 deletions.
  1. +0 −62 examples/zoom-pan/zoom-pan-transform.html
View
62 examples/zoom-pan/zoom-pan-transform.html
@@ -1,62 +0,0 @@
-<!DOCTYPE html>
-<meta charset="utf-8">
-<title>Zoom + Pan</title>
-<style>
-
-svg {
- font: 10px sans-serif;
- shape-rendering: crispEdges;
-}
-
-rect {
- fill: #ddd;
-}
-
-.axis path, .axis line {
- fill: none;
- stroke: #fff;
-}
-
-</style>
-<body>
-<script src="../../d3.js"></script>
-<script>
-
-var margin = {top: 0, right: 0, bottom: 12, left: 24},
- width = 960 - margin.left - margin.right,
- height = 500 - margin.top - margin.bottom;
-
-var x = d3.scale.linear()
- .domain([-width / 2, width / 2])
- .range([0, width]);
-
-var y = d3.scale.linear()
- .domain([-height / 2, height / 2])
- .range([height, 0]);
-
-var svg = d3.select("body").append("svg")
- .attr("width", width + margin.left + margin.right)
- .attr("height", height + margin.top + margin.bottom)
- .append("g")
- .attr("transform", "translate(" + margin.left + "," + margin.top + ")")
- .call(d3.behavior.zoom().scaleExtent([1, 8]).on("zoom", zoom))
- .append("g");
-
-svg.append("rect")
- .attr("width", width)
- .attr("height", height);
-
-svg.append("g")
- .attr("class", "x axis")
- .attr("transform", "translate(0," + height + ")")
- .call(d3.svg.axis().scale(x).tickSize(-height).orient("bottom"));
-
-svg.append("g")
- .attr("class", "y axis")
- .call(d3.svg.axis().scale(y).ticks(5).tickSize(-width).orient("left"));
-
-function zoom() {
- svg.attr("transform", "translate(" + d3.event.translate + ")scale(" + d3.event.scale + ")");
-}
-
-</script>
Please sign in to comment.
Something went wrong with that request. Please try again.