comparison exif-graphr.js @ 2:b83d9186c2af

Make sure that we're following the new update pattern
author IBBoard <dev@ibboard.co.uk>
date Mon, 29 May 2017 14:28:30 +0100
parents a11817a35877
children c1d89ae900d5
comparison
equal deleted inserted replaced
1:a11817a35877 2:b83d9186c2af
272 return "rotate(90)" 272 return "rotate(90)"
273 }); 273 });
274 var circles = circlesG.selectAll("circle") 274 var circles = circlesG.selectAll("circle")
275 .data(filteredPhotos, byID); 275 .data(filteredPhotos, byID);
276 circles.exit().remove(); 276 circles.exit().remove();
277 circles.enter() 277 var circleEnter = circles.enter()
278 .append("circle") 278 .append("circle")
279 .on('mouseover', tip.show) 279 .on('mouseover', tip.show)
280 .on('mouseout', tip.hide) 280 .on('mouseout', tip.hide)
281 // .transition() 281 // .transition()
282 // .duration(750); 282 // .duration(750);
283 283
284 circles/*.transition().duration(250)*/ 284 circles/*.transition().duration(250)*/
285 .merge(circleEnter)
285 .attr("cx", function (d) { return expAxisScale(d.exposure); }) 286 .attr("cx", function (d) { return expAxisScale(d.exposure); })
286 .attr("cy", function (d) { return flAxisScale(d.focal_length); }) 287 .attr("cy", function (d) { return flAxisScale(d.focal_length); })
287 .attr("r", function (d) { return 50 / d.f_number; }) 288 .attr("r", function (d) { return 50 / d.f_number; })
288 .attr("fill", function (d) { var h = make_camera_hue(d.camera); var s = saturationScale(d.iso); return "hsl("+h+","+s+"%,50%)";}) 289 .attr("fill", function (d) { var h = make_camera_hue(d.camera); var s = saturationScale(d.iso); return "hsl("+h+","+s+"%,50%)";})
289 .attr("stroke", "#000") 290 .attr("stroke", "#000")