{"metadata":{"version":1,"view":"all"},"components":[{"type":"data","name":"texts","visible":true,"data":[[100,100,"foo"],[180,350,"bar"],[300,200,"baz"]],"params":{"format":"headerList","display":"tsv","form":"listOfObjects","headers":["x","y","text"],"afterChange":"Hyperdeck.Run('draw')"}},{"type":"data","name":"rects","visible":false,"data":[[210,30,100,100],[50,200,100,50]],"params":{"format":"headerList","display":"csv","form":"listOfObjects","headers":["left","top","width","height"],"afterChange":"Hyperdeck.Run('draw')"}},{"type":"data","name":"lines","visible":false,"data":[[260,270,370,320]],"params":{"format":"headerList","display":"tsv","form":"listOfObjects","headers":["x1","y1","x2","y2"],"afterChange":"Hyperdeck.Run('draw')"}},{"type":"js","name":"draw","visible":false,"text":"Hyperdeck.Run('build');\n$('#build text').on('mousedown', function() {\n\n});\n","display":"codemirror","mode":"default","runOnBlur":false,"runOnLoad":true},{"type":"js","name":"build","visible":false,"text":"\nvar ls = [];\nls.push('<svg width=\"500\" height=\"500\">');\n\nHyperdeck.Get('texts').forEach(function(text) {\n\tls.push(sprintf('<text x=\"%f\" y=\"%f\">%s</text>', text.x, text.y, text.text));\n});\n\nHyperdeck.Get('rects').forEach(function(rect) {\n\tls.push(sprintf('<rect x=\"%f\" y=\"%f\" width=\"%f\" height=\"%f\" stroke=\"black\" fill=\"none\"/>', rect.left+0.5, rect.top+0.5, rect.width, rect.height));\n});\n\nHyperdeck.Get('lines').forEach(function(line) {\n\tls.push(sprintf('<line x1=\"%f\" y1=\"%f\" x2=\"%f\" y2=\"%f\" stroke=\"black\" stroke-width=\"1\" />', line.x1, line.y1, line.x2, line.y2));\n});\n\nls.push('</svg>');\nreturn ls.join('');\n","display":"codemirror","mode":"htmlgen","runOnBlur":false,"runOnLoad":false},{"type":"css","name":"css1","visible":false,"text":"#build text:hover { cursor : move; }","display":"codemirror","mode":"default","runOnBlur":true,"runOnLoad":true}]}