Vector.js

Vector is an open source javascript library for creating interactive graphics. View the repository, run the tests, or meet the team.

Radio Control Element Open in Sandbox

Description

This interactive demonstrates the radio control element.

Script

/**
* @title Radio Control Element
* @description This interactive demonstrates the radio control element.
* @tags [elements, input]
*/
import { Interactive, getScriptName } from '../../index.js';
let interactive = new Interactive(getScriptName());
interactive.width = 768;
interactive.height = 150;
interactive.root.style.border = "1px solid grey";
let radio = interactive.radioControl(100, 50, ["red", "green", "blue"]);
// let ellipse = interactive.ellipse(400,75,50,50);
// ellipse.addDependency(radio);
// ellipse.update = function(){
//     ellipse.style.fill = radio.getCurrentValue();
// }
// ellipse.update();
//# sourceMappingURL=radio-control-element.js.map