Skip to content

Commit c0d26cb

Browse files
committed
Added glass
1 parent 1158c25 commit c0d26cb

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

Template/App.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010

1111

1212
<template #hotspots>
13-
<iv-pane position='left' format='overlay' opacity=1></iv-pane>
13+
<iv-pane :allowResize=false position='left' format='overlay' :glass=true></iv-pane>
1414

15-
<iv-toggle-hotspot position='top' title='Toggle Hotspot' glass=true>
15+
<iv-toggle-hotspot position='top' title='Toggle Hotspot' :glass=true>
1616
I am in a toggle hotspot
17+
<iv-slider></iv-slider>
1718
</iv-toggle-hotspot>
1819

1920
<iv-fixed-hotspot position='topright'>

src/layouts/Pane/Pane.vue

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<div class="iv-pane-wrapper" :style="widthObj" :class="ivPaneClass">
3-
<div class="iv-pane" :class="[positionalClass('iv-pane')]" v-show=showPane>
3+
<div class="iv-pane" :class="[positionalClass('iv-pane'),{'iv-glass-effect':glass}]" v-show=showPane >
44
<div class="iv-drag-selector" :class="[positionalClass('iv-drag-selector')]" @mousedown="mouseDown" @touchstart="touchdown" ></div>
55
<div class="iv-pane-content" :class="[positionalClass('iv-pane')]">
66
<slot :toggle="togglePos" :position="position_">Default pane</slot>
77
</div>
8-
</div>
9-
<button class="iv-pane-button" :class="[positionalClass('iv-pane-button')]" @click="togglePane" :style="buttonLeft">
8+
</div>\
9+
<button class="iv-pane-button" :class="[positionalClass('iv-pane-button')]" v-if="allowResize" @click="togglePane" :style="buttonLeft">
1010
<img v-if="pointLeft" class="navImage" src="./assets/right.svg" />
1111
<img v-else class="navImage" src="./assets/left.svg" />
1212
</button>
@@ -33,10 +33,15 @@ export default {
3333
default:'push',
3434
validator: (value) => ['push','full','overlay'].indexOf(value) > -1
3535
},
36-
opacity:{ //Be aware that this might break Dan's stuff.
37-
type:Number,
36+
glass:{ //Be aware that this might break Dan's stuff.
37+
type:Boolean,
38+
required:false,
39+
default:false
40+
},
41+
allowResize:{
42+
type:Boolean,
3843
required:false,
39-
default:0
44+
default:true
4045
}
4146
},
4247
created(){
@@ -153,7 +158,7 @@ export default {
153158
},
154159
resize(e){
155160
let pageX = (e.constructor.name === "TouchEvent")? e.touches[0].pageX : e.pageX;
156-
if(this.resizer.adjusting){
161+
if(this.resizer.adjusting && this.allowResize){
157162
let deltaX = (pageX - this.resizer.initPageX) * ((this.position_ == "left")? 1:-1);
158163
this.widthPx += (this.widthPx + deltaX > minWidth && this.widthPx + deltaX < this.maxWidth)? deltaX : 0;
159164
this.resizer.initPageX = pageX;

0 commit comments

Comments
 (0)