JSFiddle - React, Tailwind, and code Playground
by realhunts
HTML
<script src="https://d309knd7es5f10.cloudfront.net/createjs.min.js"></script>
<script src="https://zimjs.com/live/zim_9.2.0_doc.js"></script>
JavaScript
var scaling = "fit"; // this will resize to fit inside the screen dimensions
var width = 1024;
var height = 768;
// as of ZIM 5.5.0 you do not need to put zim before ZIM functions and classes
var frame = new Frame(scaling, width, height);
frame.on("ready", function() {
zog("ready from ZIM Frame"); // logs in console (F12 - choose console)
var stage = frame.stage;
var stageW = frame.width;
var stageH = frame.height;
var radio = new RadioButtons({
size:40,
buttons:["Radio 1", "Radio 2", "Radio 3", "Radio 4"]
}).pos(60, 360, stage);
radio.selectedIndex = 1;
radio.on("change", function() {
indicator.selectedIndex = radio.selectedIndex;
stage.update();
});
})