bulma-slider
Advanced tools
Comparing version 0.1.6 to 0.1.7
@@ -0,1 +1,11 @@ | ||
<a name="0.1.7"></a> | ||
## [0.1.7](https://github.com/Wikiki/bulma-slider/compare/0.1.6...0.1.7) (2018-02-10) | ||
### Bug Fixes | ||
* **gulp:** Use UMD modules style ([394b555](https://github.com/Wikiki/bulma-slider/commit/394b555)) | ||
<a name="0.1.6"></a> | ||
@@ -2,0 +12,0 @@ ## [0.1.6](https://github.com/Wikiki/bulma-slider/compare/0.1.5...0.1.6) (2018-02-10) |
@@ -1,1 +0,1 @@ | ||
function findOutputForSlider(t){var e=t.id;outputs=document.getElementsByTagName("output");for(var i=0;i<outputs.length;i++)if(outputs[i].htmlFor==e)return outputs[i]}function getSliderOutputPosition(t){var e,i=window.getComputedStyle(t,null);sliderWidth=parseInt(i.getPropertyValue("width"),10),e=t.getAttribute("min")?t.getAttribute("min"):0;var u=(t.value-e)/(t.getAttribute("max")-e);return{position:(u<0?0:u>1?sliderWidth:sliderWidth*u)+"px"}}document.addEventListener("DOMContentLoaded",function(){var t=document.querySelectorAll('input[type="range"].slider');[].forEach.call(t,function(t){var e=findOutputForSlider(t);if(e){if(t.classList.contains("has-output-tooltip")){var i=getSliderOutputPosition(t);e.style.left=i.position}t.addEventListener("input",function(t){if(t.target.classList.contains("has-output-tooltip")){var i=getSliderOutputPosition(t.target);e.style.left=i.position}e.value=t.target.value})}})}); | ||
!function(t,e){if("function"==typeof define&&define.amd)define([],e);else if("undefined"!=typeof exports)e();else{e(),t.bulmaSliderMin={}}}(this,function(){"use strict";function t(t){var e,i=window.getComputedStyle(t,null);sliderWidth=parseInt(i.getPropertyValue("width"),10),e=t.getAttribute("min")?t.getAttribute("min"):0;var n=(t.value-e)/(t.getAttribute("max")-e);return{position:(n<0?0:n>1?sliderWidth:sliderWidth*n)+"px"}}document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('input[type="range"].slider');[].forEach.call(e,function(e){var i=function(t){var e=t.id;outputs=document.getElementsByTagName("output");for(var i=0;i<outputs.length;i++)if(outputs[i].htmlFor==e)return outputs[i]}(e);if(i){if(e.classList.contains("has-output-tooltip")){var n=t(e);i.style.left=n.position}e.addEventListener("input",function(e){if(e.target.classList.contains("has-output-tooltip")){var n=t(e.target);i.style.left=n.position}i.value=e.target.value})}})})}); |
{ | ||
"name": "bulma-slider", | ||
"version": "0.1.6", | ||
"version": "0.1.7", | ||
"description": "Display classic slider more sexy, in different colors, sizes, and states ", | ||
@@ -5,0 +5,0 @@ "main": "dist/bulma-slider.sass", |
27159