[ Launch: cat clicking ] 6641669 by alexdean
[ Launch: cat clicking ] 6641459 by enjalot
-
-
Save alexdean/6641669 to your computer and use it in GitHub Desktop.
cat clicking
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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/EClEhEW.png"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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