Socket
Book a DemoInstallSign in
Socket

ng-circle-slider

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-circle-slider

Angular 2 Round slider

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

Keywords

angular

FAQs

Package last updated on 26 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts