2.0.0 • Published 4 years ago

tsumami.js v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

MIT License TWITTER NPM Package Build Size

Tsumami.js

This is a knob in place of a slider.

Installation

<script src="dist/tsumami.js"></script>
import Tsumami from 'tsumami.js';

Usage

const tsumamiValue = (()=>{
  const val = Object.create(null);
  Object.defineProperty(val, 'value', {
    set: (value)=>{
      //processing
    }
  });
  return val;
})();

const option = {
  obj: tsumamiValue
}

const tsumami = new Tsumami(option);

Options

UseVariable NameDefault ValueRemarks
Sizesize100
Targettargetdocument.getElementById("tsumami")
Background Colorbgcolor"red"css color 1
Pinch Colortmmcolor"yellow"css color 1
Meter Background Colormbgcolor"black"css color 1
Meter SizemeterSize10
Meter Angledegree2700~360
Meter Scalescale1.2
Min Valuemin0min < max 2
Max Valuemax100min < max 2
Value Objobj""tsumamiValue
Meter Colormcolor"blue"css color 1
Point Colorpoint"purple"css color 1
Initial Valuevalue0min ≤ value ≤ max 2
Modemodenomalnomal or center
Center ValuecenterValue500 ≤ centerValue 3

LINK

example : example
support : support

License

MIT License, Copyright (c) 2020 Akatsuki1910

Update

v2.0.0

Compatible with rotation from the center.

v1.0.2

Miss fixes.

v1.0.1

English Update

v1.0.0

release

v0.2.0

option add : Initial Value Create an example page. Bug fixes.

v0.1.0

First Update.

2.0.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago