Difference between revisions of "Template:Heidelberg/Weltkugel"

Line 134: Line 134:
 
         //Setup path for globe
 
         //Setup path for globe
 
         var projection = d3.geo.azimuthal().mode("orthographic").translate([width / 2, height / 2]);
 
         var projection = d3.geo.azimuthal().mode("orthographic").translate([width / 2, height / 2]);
         var scale0 = projection.scale()-50;
+
         var scale0 = projection.scale();
 
         var path = d3.geo.path().projection(projection)
 
         var path = d3.geo.path().projection(projection)
 
         var arcPath = d3.geo.path().projection(projection)
 
         var arcPath = d3.geo.path().projection(projection)
Line 142: Line 142:
 
         start = [49.4057072, 8.6135741]
 
         start = [49.4057072, 8.6135741]
 
         //Setup zoom behavior
 
         //Setup zoom behavior
         var zoom = d3.behavior.zoom(false)
+
         var zoom = d3.behavior.zoom(true)
 
         .translate(projection.origin())
 
         .translate(projection.origin())
         .scale(projection.scale())
+
         .scale(projection.scale()-50)
 
         .scaleExtent([200, 200])
 
         .scaleExtent([200, 200])
 
         .on("zoom", move);
 
         .on("zoom", move);

Revision as of 04:40, 1 November 2017