Giter VIP home page Giter VIP logo

imnitinnayar7 / angular-circular-slider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from princejwesley/angular-circular-slider

0.0 1.0 0.0 52 KB

Angular port of circular slider which helps to slide range of values and images. It supports half(top/bottom/up/down) and full circle shapes

Home Page: http://www.toolitup.com/circular-slider.html

License: MIT License

JavaScript 53.15% CSS 46.85%

angular-circular-slider's Introduction

angular-circular-slider

Angular port of circular-slider which helps to slide range of values and images. It supports half(top/bottom/up/down) and full circle shapes

circular slider

![Gitter](https://badges.gitter.im/Join Chat.svg)

Install

bower install angular-circular-slider

Basic Usage

var app = angular.module('yourApp',
  ['angular.circular-slider']);
<link rel="stylesheet"
 href="dist/css/angular-circular-slider.min.css" />
<script src="dist/js/angular-circular-slider.js">
</script>
..
<circular-slider
  class='my-slider'
  shape='{{shape}}'
  touch="true"
  animate='true'
  on-slide='onSlide'
  on-slide-end='onSlideEnd'
  min="min"
  max="200"
  value="value">
  {{value}}
</circular-slider>

Properites

radius

radius of the circle in px.

innerCircleRatio

ratio of inner circle area(used to display current sliding value).

indicatorBallRatio

ratio of indicator ball.

min

min value of the slider.

max

max value of the slider.

value

Initial value of the slider.

clockwise

direction of the sliding value.

shape

shape of the slider. Supported shapes are:

  1. 'Circle' (default)
  2. 'Half Circle'
  3. 'Half Circle Left'
  4. 'Half Circle Right'
  5. 'Half Circle Bottom'

touch

touch support. (default: true)

animate

linear animation support. (dafault: true)

animateDuration

Animation duration in milliseconds. (default: 360ms)

selectable

text selection enabled or not. (default: false)

disabled

slider is disabled or not. (default: false)

handleDistRatio

Distance between handle and shape center(default: 1.0)

borderWidth

Border width(in px) of the slider(default: 1)

Callbacks

###onSlide(value)

onSlide callback is triggered whenever there is a change in sliding value.

Parameters:

value - Current sliding value

###onSlideEnd(value)

onSlideEnd callback is triggered when the user action is done (on mouse up/touch end or click).

Parameters:

value - Current sliding value

##Default values

defaults: {
  min: 0,
  max: 359,
  value: 0,
  radius: 75,
  innerCircleRatio: 0.5,
  borderWidth: 1,
  indicatorBallRatio: 0.2,
  handleDistRatio: 1.0,
  clockwise: true,
  shape: "Circle",
  touch: true,
  animate: true,
  animateDuration: 360,
  selectable: false,
  disabled: false,
  onSlide: angular.noop,
  onSlideEnd: angular.noop,
},

Scope bindings

scope: {
  min: '=?',
  max: '=?',
  value: '=?',
  radius: '=?',
  innerCircleRatio: '=?',
  indicatorBallRatio: '=?',
  handleDistRatio: '=?',
  borderWidth: '=?',
  clockwise: '=?',
  shape: '@?',
  touch: '=?',
  animate: '=?',
  animateDuration: '=?',
  selectable: '=?',
  disabled: '=?'
  onSlide: '=',
  onSlideEnd: '=',
},

Watchers

scope: {
  value: '=?',
  disabled: '=?'
}

CSS classes

Use the below css classes for customization

.acs-panel - circular slider panel

.acs - Slider area

.acs-value - Inner circle area

.acs-indicator - Slide indicator ball

License

This plugin is licensed under the MIT license.

Copyright (c) 2015 Prince John Wesley

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.