0.2.9 • Published 7 years ago

angular2-round-slider v0.2.9

Weekly downloads
7
License
MIT
Repository
github
Last release
7 years ago

angular2-round-slider

Installation

To install this component, run:

$ npm install angular2-round-slider --save

Using Smartenit Module

Include RoundSliderComponent in your Angular 2 main module:

// ...
import { RoundSliderComponent } from 'angular2-round-slider/dist';

@NgModule({
  // ...
  declarations: [
    // ...
    RoundSliderComponent
  ]
})
export class AppModule { }

Usage

<round-slider #sliderElem 
    [width]="140" 
    [height]="140" 
    [radius]="50"
    [value]="levelControlValue"
    (onChangeEnd)="listenerEvent$.next(sliderElem.value)"
    [image]="'https://s-media-cache-ak0.pinimg.com/736x/99/9b/af/999baff3288ebe0232ac9d34ac7b73ba.jpg'"
></round-slider>

Styling

Please make sure to include and customize the component scss in your angular project

round-slider {
  display: block;

  .round-slider-container {
    position: relative;
  }

  .container {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 20;
  }

  .round-slider-image {
    background-size: cover;
    border-radius: 50%;
    position: absolute;
  }

  .round-slider-text {
    text-align: center;
    position: absolute;
    width: 100%;
    display: table-cell;
    vertical-align: middle;
    top: 41%;
    pointer-events: none;
    z-index: 10;
    color: white;
    font-size: 18px;
  }

  .circumference {
    &.transparent {
      fill: transparent;
    }
    fill: #f2f2f2;
  }

  .dot circle:hover {
    cursor: pointer;
  }

  .dot circle {
    fill: lightsteelblue;
    stroke: lightsteelblue;
    stroke-width: 1.5px;
  }

  .dot circle.dragging {
    fill: steelblue;
    stroke: steelblue;
  }

  .arc {
    fill: steelblue;
  }
}

License

MIT

0.2.9

7 years ago

0.2.8

7 years ago

0.2.7

7 years ago

0.2.6

7 years ago

0.2.5

7 years ago

0.2.4

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.9

7 years ago

0.1.81

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago