Skip to content

Instantly share code, notes, and snippets.

@enjalot
Created September 20, 2013 18:10
Show Gist options
  • Save enjalot/6641459 to your computer and use it in GitHub Desktop.
Save enjalot/6641459 to your computer and use it in GitHub Desktop.
cat clicking
{"description":"cat clicking","endpoint":"","display":"div","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/2jsHM2Q.png"}
var url = "http://i.imgur.com/FuW3Qnd.jpg";
var display = d3.select("#display")
display.append("img")
.attr({
src: url,
width: 300,
height: 300
})
var svg = display.append("svg")
.attr({
width: 300,
height: 300
}).style({
position: "absolute",
left: 0
})
svg.append("rect")
.attr({
x: 60,
y: 127,
width: 57,
height: 106
}).style({
fill: "none",
stroke: "#000",
"pointer-events": "all"
}).on("click", function() {
console.log("meow")
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment