MCPcopy Create free account
hub / github.com/BloombergGraphics/whatiscode / oninit

Function oninit

modules/maps/maps.js:117–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115
116 //called when scrolled into view
117 function oninit(){
118 gimages.transition().duration(1000)
119 .style("left",function(d,i){ return d.position.x+"px" })
120 .style("top",function(d,i){ return d.position.y+"px" });
121
122 textlayer.transition().delay(1000).duration(500).style("opacity",1);
123 intro.transition().delay(1000).duration(500).style("opacity",1);
124 sources.transition().delay(1000).duration(500).style("opacity",1);
125
126 // d3.xhr("modules/maps/map.svg", function(error, svg) {
127
128 // module.sel.append("div#code-atlas").html(svg.response);
129 // module.sel.selectAll("svg g text").style("opacity",0);
130
131 // var groups = module.sel.selectAll("svg g")
132 // .attr("transform",function(d,i){
133 // var x = (i%2 == 0) ? -1000 : 1000;
134 // var y = (i%2 == 0) ? 1000 : -1000;
135 // return "translate("+x+","+y+")";
136 // });
137
138 // groups
139 // .transition().delay(function(d,i){ return i*100 }).duration(1000)
140 // .attr("transform",function(d){ return "translate(0,0)" });
141
142 // module.sel.selectAll("svg g text")
143 // .transition().delay(2000).duration(500)
144 // .style("opacity",1);
145
146 // })
147 }
148
149})()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected