Skip to content

Commit

Permalink
fix: add z-index to rail
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyi7099 committed Jun 4, 2018
1 parent 28359ad commit 6acc2b4
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 11 deletions.
5 changes: 3 additions & 2 deletions dist/vuescroll.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2824,7 +2824,7 @@ var bar = {
var vm = this;
var parentRef = vm.$parent.$refs;
var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var bar = {
style: style,
class: 'vuescroll-' + vm.type + '-bar',
Expand Down Expand Up @@ -2852,7 +2852,8 @@ var bar = {
class: 'vuescroll-' + vm.type + '-rail',
style: (_style2 = {
position: 'absolute',
borderRadius: vm.ops.rail[vm.bar.opsSize],
zIndex: 1,
// borderRadius: vm.ops.rail[vm.bar.opsSize],
background: railBackgroundColor
}, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2),
on: {
Expand Down
2 changes: 1 addition & 1 deletion dist/vuescroll.common.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/vuescroll.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2820,7 +2820,7 @@ var bar = {
var vm = this;
var parentRef = vm.$parent.$refs;
var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var bar = {
style: style,
class: 'vuescroll-' + vm.type + '-bar',
Expand Down Expand Up @@ -2848,7 +2848,8 @@ var bar = {
class: 'vuescroll-' + vm.type + '-rail',
style: (_style2 = {
position: 'absolute',
borderRadius: vm.ops.rail[vm.bar.opsSize],
zIndex: 1,
// borderRadius: vm.ops.rail[vm.bar.opsSize],
background: railBackgroundColor
}, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2),
on: {
Expand Down
2 changes: 1 addition & 1 deletion dist/vuescroll.esm.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dist/vuescroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -2826,7 +2826,7 @@ var bar = {
var vm = this;
var parentRef = vm.$parent.$refs;
var railBackgroundColor = getRgbAColor(vm.ops.rail.background, vm.ops.rail.opacity);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var style = (_style = {}, _defineProperty$1(_style, vm.bar.posName, 0), _defineProperty$1(_style, vm.bar.opsSize, '100%'), _defineProperty$1(_style, vm.bar.size, vm.state.size), _defineProperty$1(_style, 'borderRadius', 'inherit'), _defineProperty$1(_style, 'background', vm.ops.bar.background), _defineProperty$1(_style, 'opacity', vm.state.opacity), _defineProperty$1(_style, 'transform', 'translate' + scrollMap[vm.type].axis + '(' + vm.state.posValue + '%)'), _defineProperty$1(_style, 'cursor', 'pointer'), _defineProperty$1(_style, 'position', 'relative'), _defineProperty$1(_style, 'transition', 'opacity .5s'), _defineProperty$1(_style, 'userSelect', 'none'), _style);
var bar = {
style: style,
class: 'vuescroll-' + vm.type + '-bar',
Expand Down Expand Up @@ -2854,7 +2854,8 @@ var bar = {
class: 'vuescroll-' + vm.type + '-rail',
style: (_style2 = {
position: 'absolute',
borderRadius: vm.ops.rail[vm.bar.opsSize],
zIndex: 1,
// borderRadius: vm.ops.rail[vm.bar.opsSize],
background: railBackgroundColor
}, _defineProperty$1(_style2, vm.bar.opsSize, vm.ops.rail[vm.bar.opsSize]), _defineProperty$1(_style2, vm.bar.posName, '2px'), _defineProperty$1(_style2, vm.bar.opposName, '2px'), _defineProperty$1(_style2, vm.ops.rail.pos, 0), _style2),
on: {
Expand Down
2 changes: 1 addition & 1 deletion dist/vuescroll.min.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions src/components/child-components/vuescroll-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export default {
[vm.bar.posName]: 0,
[vm.bar.opsSize]: '100%',
[vm.bar.size]: vm.state.size,
borderRadius: vm.ops.rail[vm.bar.opsSize],
borderRadius: 'inherit',
background: vm.ops.bar.background,
opacity: vm.state.opacity,
transform: `translate${scrollMap[vm.type].axis}(${vm.state.posValue}%)`,
Expand Down Expand Up @@ -201,7 +201,8 @@ export default {
class: `vuescroll-${vm.type}-rail`,
style: {
position: 'absolute',
borderRadius: vm.ops.rail[vm.bar.opsSize],
zIndex: 1,
// borderRadius: vm.ops.rail[vm.bar.opsSize],
background: railBackgroundColor,
[vm.bar.opsSize]: vm.ops.rail[vm.bar.opsSize],
[vm.bar.posName]: '2px',
Expand Down

0 comments on commit 6acc2b4

Please sign in to comment.