jhnsnc / precision-inputs

A highly customizable, accessible set of framework-agnostic input components for precision controls (knobs, dials, sliders, etc).
MIT License
51 stars 8 forks source link

Knobs not chaning on drag #20

Closed nombrekeff closed 5 years ago

nombrekeff commented 5 years ago

Lib Version @0.2.5

Chrome @71.0.3578.98

Knobs are not changing

Knobs are not changing when I click and drag them, they are rendered and react to hover but dont change when I drag them, I've tested the demo and there it works fine...

Here is the code that is failing:

  <link rel="stylesheet" href="https://unpkg.com/precision-inputs@0.2.5/css/precision-inputs.fl-controls.css">
  ...
  <div class="my-fl-knob"></div>
  <script src="https://unpkg.com/precision-inputs@0.2.5/scripts/precision-inputs.fl-controls.js"></script>
  <script>
    var myKnobContainer = document.querySelector('.my-fl-knob');
    var myKnob = new PrecisionInputs.FLReactiveGripDial(myKnobContainer);
  </script>

Any idea what could be wrong?

nombrekeff commented 5 years ago

Hi, I solved it. It was a problem with putting the script tag in the header. Putting it inside the body solved the issue!