{"name":"Scroller","key":"scroller","version":"1.0.1","instructions":"This is a simple vertical scroller, that scrolls a block of text up until the end.","showatto":"1","showplayers":"0","requirecss":"","requirejs":"","shim":"","defaults":"seconds=20,height=300","amd":"1","body":"<div id='@@AUTOID@@_outer' class=\"filter_poodll_scroller_outer\" style=\"height: @@height@@px; width: 80%\">\n<button id='@@AUTOID@@_startbutton' type=\"button\" class='filter_poodll_scroller_startbutton'>Start</button>\n<div id='@@AUTOID@@_inner' class=\"filter_poodll_scroller_inner\" style='top: @@height@@px'>\n \n","bodyend":"</div>\n</div>","script":"/* Inits the whole scroller */ \nfunction init_scroller(){\n  var startbutton = $('#' + @@AUTOID@@ + '_startbutton');\n  startbutton.click(run_scroller);\n}\n\n/* Resets to the scroll start position, and shows button */ \nfunction reset_scroller(){\n  var startbutton = $('#' + @@AUTOID@@ + '_startbutton');\n  var inner = $('#' + @@AUTOID@@ + \"_inner\"); \n  \n  inner.css({\"top\": @@height@@ + 'px'}); \n  startbutton.show();\n}\n\n/* begins the scrolling */\nfunction run_scroller(){\n   var startbutton = $('#' + @@AUTOID@@ + '_startbutton');\n   startbutton.hide();\n    var inner = $('#' + @@AUTOID@@ + \"_inner\");\n    var outer = $('#' + @@AUTOID@@ + \"_outer\");\n    var outerheight = outer.outerHeight();   \n    var innerheight = inner.outerHeight();  \n \n    inner.css({\"top\": outerheight});\n    var top = parseInt(inner.css(\"top\").replace(\"px\",\"\"));\n    inner.animate({\"top\": outerheight-innerheight},1000 * @@seconds@@,reset_scroller);           \n}\n\n/* the command that runs on widget load */\ninit_scroller();\n","style":".filter_poodll_scroller_inner{\n    position:relative;\n    margin:0;\n    padding:0;\n}\n.filter_poodll_scroller_outer{\n    overflow: hidden;\n    margin:0;\n    padding:0;\n    border: solid 1px;\n}\n\n.filter_poodll_scroller_startbutton {\n    margin: auto;\n    height: 50px;\n    width: auto;\n    border: 1px solid red;\n    display: flex;\n    top: 100px;\n    position: relative;\n}","dataset":"","datasetvars":"","alternate":"","alternateend":""}