Skip to content

Commit 23cf463

Browse files
committed
Add handleSize prop
1 parent f8b2334 commit 23cf463

File tree

7 files changed

+24
-7
lines changed

7 files changed

+24
-7
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# ChangeLog
22

3+
## v0.3.5
4+
5+
### New Features
6+
- Added handle size prop
7+
38
## v0.3.3
49

510
### Bug Fix

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,11 @@ handleColor|string|#ffffff|Slider handle color
8282
gridTextColor|string|silver|Primary color
8383
fontFamily|string|'Arial, sans-serif'|Set text font family
8484
fontSize|number|12|Set text font size
85+
handleSize|number|26|Slider handle size
8586
histSliderGap|number|6|Set gap between slider and histogram
8687
updateColorOnChange|boolean|true|Update histogram bar color on change **(recommended false for performance)**
8788

88-
## Event
89+
## 🔧 Event
8990
Name|Description
9091
---|---
9192
start |Triggers when slider start.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-histogram-slider",
33
"description": "Range slider with histogram for vue.js",
4-
"version": "0.3.4",
4+
"version": "0.3.5",
55
"main": "dist/histogram-slider.umd.min.js",
66
"license": "GPL-3.0",
77
"repository": {

src/App.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
:prettify="prettify"
1010
:clip="true"
1111
:drag-interval="true"
12+
:hideFromTo="true"
1213
@finish="finish"
1314
:force-edges="false"
1415
:colors="['#4facfe', '#00f2fe']"

src/lib/HistogramSlider.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export default {
4242
--font-family: ${this.fontFamily};
4343
--font-size: ${this.fontSize};
4444
--hist-slider-gap: ${-36 + this.histSliderGap}px;
45+
--handle-size: ${this.handleSize}px;
4546
`;
4647
}
4748
},
@@ -430,12 +431,12 @@ export default {
430431
431432
.irs--round .irs-handle {
432433
cursor: pointer;
433-
top: 30px;
434-
width: 16px;
435-
height: 16px;
436-
/* border: 4px solid #006cfa; */
434+
top: calc(50% - var(--handle-size) / 2 + 5px);
435+
width: var(--handle-size);
436+
height: var(--handle-size);
437437
background-color: var(--handle-color);
438-
border-radius: 18px;
438+
z-index: 9;
439+
border-radius: 50%;
439440
box-shadow: 0 1px 3px rgba(0, 0, 255, 0.3);
440441
}
441442

src/lib/props.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,5 +131,9 @@ export default {
131131
updateColorOnChange: {
132132
type: Boolean,
133133
default: true
134+
},
135+
handleSize: {
136+
type: Number,
137+
default: 26
134138
}
135139
};

vue.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
devServer: {
3+
port: 8000
4+
}
5+
};

0 commit comments

Comments
 (0)