Git Product home page Git Product logo

jim-knopf's Introduction

Jim Knopf is a small JavaScript library to create knobs using SVG.

Supported Browser

tested in latest Chrome, Firefox, Opera, Safari and Mobile Safari

Knobs can changed by moving mouse, keyboard (← ↑ → ↓ ), mousewheel and touchpad Navigate trough knobs by tab key

Example

http://eskimoblood.github.com/jim-knopf/

Build Status

License

The MIT License (MIT) Copyright (c) <2012> <Andreas Köberle>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jim-knopf's People

Contributors

bryant1410 avatar eskimoblood avatar wakandan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jim-knopf's Issues

Ugly dotted rectagles when you click on it.

Very nice and elegant knobs.
I am using Firefox on Ubuntu Linux 16. When I click on any of these knobs (at the demo page as well) a ugly dotted rectangle appears. This rectangle is normally a little wider than the knob area, sometime is shifted a little to the right, but always covers the area from the lower border of the knob up to the upper border of the Firefox window. As it always goes up to the top of the Firefox window, it can become quiet large and is very interfering with the rest of the page.
What is this and can it be removed.
Thanks for all your work.
Julius

[FEATURE] Knobs will act like a vertical slider

Hi,

I would like to adopt your knobs to my application: https://github.com/TimSusa/midi-sliders
If you like, you can give it a try and tell me, what you think of it.

I wonder, how it would be possible to make the knobs only react on y-direction. Please note, that a knob in a DAW like Ableton Live or Traktor DJ Software, for example, would all have the same kind of reaction. They just act like a vertical slider. People, who produce music are get to used to this.

Best Regards,

Tim Susa.

mouse dragging in bootstrap

when using knobs with bootstrap, as soon as a knob is inside a col with a size (col-md-12 etc.), the mouse dragging stops working. It doesn't matter how many layers down the DOM the knob is inside the col.

set initial value of knob

Hello, I need advice in how to set the initial value when creating a knob. Also a simple callback example would help me.

callback funtion

hi , thanks for light weight library , its really elegant, however I don't know how to link knob to the callback function whenever its value changed , for example I would like to send its data to server when it changed or when receive new value set it position to new value
I really appreciated if you could make example for that

data-labels scale are rendered according to supplied settings, but the pointer is not

image

As can be seen in the picture, the pointers are not using supplied settings, make it difficult to sync with the dials,

Ui.P6 = function() {};

Ui.P6.prototype = Object.create(Ui.prototype);

Ui.P6.prototype.createElement = function() {
  Ui.prototype.createElement.apply(this, arguments);  
  this.addComponent(new Ui.Pointer({
    type: 'Arc',
    size: 30,
    outerRadius: this.width / 2.6,
    innerRadius: this.width / 2.6 - this.width / 6,
    angleoffset: this.options.angleoffset
  }));
  // this.addComponent(new Ui.Text());
  this.addComponent(new Ui.Scale(this.merge(this.options, {
    drawScale: false,
    drawDial: true,
    radius: this.width/2.5
  })));
  var circle = new Ui.El.Circle(this.width / 2.1, this.width / 2, this.height / 2);
  this.el.node.appendChild(circle.node);
  this.el.node.setAttribute("class", "p5 p6");
};

new Knob(document.getElementById('p6'), new Ui.P6()); 

The above code is basically p5, with the addition of Scale which made used of data-labels attribute.

I was trying to make it work but had no clue how to sync the pointer. Any suggestion?

Events support

Do you support any events, so we can actually get/set values to the knobs?
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.