Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@maslick/radiaslider
Advanced tools
a pure JavaScript circular/linear knob-style slider
* works on desktop, mobile and tablets
* small size (minified ~6 Kb)
* no dependencies
* pure JavaScript (ES5)
* browser and Node.js friendly
<canvas id="myCanvas" width="300" height="300"></canvas>
<span id="value1"></span>
<script src="slider-circular.min.js"></script>
<script>
var slider = new Slider({ canvasId: "myCanvas", continuousMode: true, x0: 150, y0: 150 });
slider.addSlider({
id: 1,
radius: 50,
min: 0,
max: 30,
step: 5,
color: "#104b63",
changed: function (v) {
document.getElementById('value1').innerHTML = "Angle: " + v.deg + " deg, value: " + v.value;
}
});
</script>
<script src="slider-linear.min.js"></script>
<script>
var slider = new Slider({ canvasId: "myCanvas", continuousMode: true, vertical: false });
slider.addSlider({
id: 1
width: 50,
min: 0,
max: 30,
step: 5,
color: "#104b63",
changed: function (v) {
document.getElementById('value1').innerHTML = "Width: " + v.width + " px, value: " + v.value;
},
x0: 30,
y0: 30
});
</script>
If you want to change the value programmatically, use:
slider.setSliderValue(<sliderId>, <value>);
To get the current value:
slider.sliders[<sliderId>].normalizedValue // current value
slider.sliders[<sliderId>].ang_degrees // current angle in degrees (circular only)
slider.sliders[<sliderId>].endAngle // current angle in radians (circular only)
slider.sliders[<sliderId>].value // current width in pixels (linear only)
Radia slider can be used either in the Browser or in the Node.js environment. For a React.js example look here.
This project is licenced under the MIT License.
FAQs
nice looking canvas-based radial and linear slider
The npm package @maslick/radiaslider receives a total of 26 weekly downloads. As such, @maslick/radiaslider popularity was classified as not popular.
We found that @maslick/radiaslider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.