playground - dont use float for gauge meter value

This commit is contained in:
Marcus 2024-05-02 16:01:33 +02:00
parent 7c072735ad
commit c2d5a305de
2 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@
<body> <body>
<div class="gauge gauge--liveupdate" id="gauge"> <div class="gauge gauge--liveupdate" id="gauge">
<div class="gauge__container"> <div class="gauge__container">
<div class="gauge__marker"></div> <!-- <div class="gauge__marker"></div> -->
<div class="gauge__background"></div> <div class="gauge__background"></div>
<div class="gauge__center"></div> <div class="gauge__center"></div>
<div class="gauge__data"></div> <div class="gauge__data"></div>
@ -44,7 +44,7 @@
var gauge = new Gauge(document.getElementById("gauge")); var gauge = new Gauge(document.getElementById("gauge"));
gauge.value(0.75); gauge.value(75);
</script> </script>
</body> </body>

View file

@ -45,7 +45,7 @@ function Gauge(el) {
exports.value = function(x) { exports.value = function(x) {
if (!arguments.length) { return value; } if (!arguments.length) { return value; }
setValue(x); setValue(x / 100);
return this; return this;
}; };