Commit 06930625 authored by Rafal Zajac's avatar Rafal Zajac

Presentation mode. Close #57

parent 47d4cf1b
......@@ -98,6 +98,10 @@ $scope.priceSlider = {
> Set to true to always show selection bar
**rz-slider-present-only**
> When set to true slider is used in presentation mode. No handle dragging.
**rz-slider-translate**
> Custom translate function. Use this if you want to translate values displayed on the slider. For example if you want to display dollar amounts instead of just numbers do this:
......
{
"name": "angularjs-slider",
"version": "0.1.17",
"version": "0.1.18",
"homepage": "https://github.com/rzajac/angularjs-slider",
"authors": [
"Rafal Zajac <rzajac@gmail.com>",
......
/*! jusas-angularjs-slider - v0.1.17 - (c) Rafal Zajac <rzajac@gmail.com>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-05-28 */
/*! jusas-angularjs-slider - v0.1.18 - (c) Rafal Zajac <rzajac@gmail.com>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-05-28 */
rzslider{position:relative;display:inline-block;width:100%;height:4px;margin:30px 0 15px 0;vertical-align:middle}rzslider span{position:absolute;display:inline-block;white-space:nowrap}rzslider span.rz-base{width:100%;height:100%;padding:0}rzslider span.rz-bar{z-index:0;width:100%;height:100%;background:#d8e0f3;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}rzslider span.rz-bar.rz-selection{z-index:1;width:0;background:#0db9f0;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px}rzslider span.rz-pointer{top:-14px;z-index:2;width:32px;height:32px;cursor:pointer;background-color:#0db9f0;-webkit-border-radius:16px;-moz-border-radius:16px;border-radius:16px}rzslider span.rz-pointer:after{position:absolute;top:12px;left:12px;width:8px;height:8px;background:#fff;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;content:''}rzslider span.rz-pointer:hover:after{background-color:#fff}rzslider span.rz-pointer.rz-active:after{background-color:#451aff}rzslider span.rz-bubble{top:-32px;padding:1px 3px;color:#55637d;cursor:default}rzslider span.rz-bubble.rz-selection{top:16px}rzslider span.rz-bubble.rz-limit{color:#55637d}
\ No newline at end of file
This diff is collapsed.
{
"name": "jusas-angularjs-slider",
"version": "0.1.17",
"version": "0.1.18",
"description": "AngularJS slider directive with no external dependencies. Mobile friendly!.",
"main": "rzslider.js",
"repository": {
......
......@@ -4,7 +4,7 @@
* (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider
*
* Version: v0.1.17
* Version: v0.1.18
*
* Licensed under the MIT license
*/
......@@ -177,6 +177,16 @@ function throttle(func, wait, options) {
*/
this.hideLimitLabels = !!attributes.rzSliderHideLimitLabels;
/**
* Only present model values
*
* Do not allow to change values
*
* @type {boolean}
*/
this.presentOnly = attributes.rzSliderPresentOnly === 'true';
console.log(this.presentOnly); // TODO: remove this!
/**
* The delta between min and max value
*
......@@ -239,7 +249,7 @@ function throttle(func, wait, options) {
self.updateCeilLab();
self.updateFloorLab();
self.initHandles();
self.bindEvents();
if (!self.presentOnly) { self.bindEvents(); }
});
// Recalculate slider view dimensions
......@@ -995,7 +1005,8 @@ function throttle(func, wait, options) {
rzSliderHigh: '=?',
rzSliderTranslate: '&',
rzSliderHideLimitLabels: '=?',
rzSliderAlwaysShowBar: '=?'
rzSliderAlwaysShowBar: '=?',
rzSliderPresentOnly: '@'
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment