Skip to content

Instantly share code, notes, and snippets.

@georules
Created November 27, 2012 03:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save georules/4152137 to your computer and use it in GitHub Desktop.
Another Inlet
{"description":"Another Inlet","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.5390625,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"editor_editor":{"coffee":false,"vim":false,"emacs":false,"width":600,"height":300,"hide":false}}
var textstring = "Tributary!";
var textx = 120;
var texty = 314;
var fontsize = 253;
var squarex = 102;
var squarey = 73;
var squaresize = 300;
var squarefill = "#005A20";
var squareopacity = 0.4608;
var circlex = 258;
var circley = 457;
var circlesize = 120;
var circlefill = "#0B4F85";
var circleopacity = 0.56;
var circlestroke = "#0585A5";
var circlestrokewidth = 15;
var svg = d3.select("svg")
var text = svg.append("svg:text")
.attr("x", textx)
.attr("y", texty)
.text(textstring)
.attr("class", "letter")
.style("font-size", fontsize);
var square = svg.append("svg:rect")
.attr("x", squarex)
.attr("y", squarey)
.attr("width", squaresize)
.attr("height", squaresize)
.style("fill", squarefill)
.style("opacity", squareopacity);
var circle = svg.append("svg:circle")
.attr("cx", circlex)
.attr("cy", circley)
.attr("r", circlesize)
.style("fill", circlefill)
.style("opacity", circleopacity)
.style("stroke", circlestroke)
.style("stroke-width", circlestrokewidth);
// need to add in simple-hint.js
try{
CodeMirror.commands.autocomplete = function(cm) {
var cm = tb.__config__.contexts[0].editor.cm;
CodeMirror.simpleHint(cm, CodeMirror.javascriptHint);
console.log("autocomplete suggestions");
}
}
catch(err){
console.log("sdkfjksd");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment