Skip to content

Commit 954dd0e

Browse files
committed
Revert "Remove debugging statements"
This reverts commit d07e698.
1 parent c7aa972 commit 954dd0e

File tree

15 files changed

+99
-13
lines changed

15 files changed

+99
-13
lines changed

dev/components/new-layout/new-layout.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export default {
180180
headerReveal: false,
181181
footerReveal: false,
182182
leftOverlay: true,
183-
rightOverlay: false,
183+
rightOverlay: true,
184184
leftBehavior: 'default',
185185
rightBehavior: 'default',
186186
leftBreakpoint: 992,

src/components/action-sheet/QActionSheet.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ export default {
9090
this.$emit('hide')
9191
},
9292
dismiss: () => {
93+
console.log('DIALOG received dismiss, hiding then emitting cancel')
9394
this.__onCancel()
9495
},
9596
'escape-key': () => {
@@ -103,9 +104,11 @@ export default {
103104
},
104105
methods: {
105106
show () {
107+
console.log('AS show')
106108
return this.$refs.modal.show()
107109
},
108110
hide () {
111+
console.log('AS hide')
109112
return this.$refs.modal.hide()
110113
},
111114
__getActions (h) {
@@ -135,12 +138,16 @@ export default {
135138
)
136139
},
137140
__onOk (action) {
141+
console.log('AS onOK')
138142
this.hide().then(() => {
143+
console.log('AS onOK emitting ok')
139144
this.$emit('ok', action)
140145
})
141146
},
142147
__onCancel () {
148+
console.log('AS onCancel')
143149
this.hide().then(() => {
150+
console.log('AS onCancel emitting cancel')
144151
this.$emit('cancel')
145152
})
146153
}

src/components/dialog/QDialog.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export default {
9696
this.$emit('input', val)
9797
},
9898
show: () => {
99+
console.log('DIALOG show emitting show')
99100
this.$emit('show')
100101

101102
if (!this.$q.platform.is.desktop) {
@@ -114,9 +115,11 @@ export default {
114115
}
115116
},
116117
hide: () => {
118+
console.log('DIALOG hide emitting hide')
117119
this.$emit('hide')
118120
},
119121
dismiss: () => {
122+
console.log('DIALOG received dismiss, hiding then emitting cancel')
120123
this.$emit('cancel')
121124
},
122125
'escape-key': () => {
@@ -145,6 +148,7 @@ export default {
145148
},
146149
methods: {
147150
show () {
151+
console.log('DIALOG show')
148152
return this.$refs.modal.show()
149153
},
150154
hide () {
@@ -154,6 +158,7 @@ export default {
154158
if (this.hasForm) {
155159
data = clone(this.__getData())
156160
}
161+
console.log('DIALOG hide data:', data)
157162
return data
158163
})
159164
},
@@ -209,11 +214,13 @@ export default {
209214
},
210215
__onOk () {
211216
return this.hide().then(data => {
217+
console.log('DIALOG emitting ok', data)
212218
this.$emit('ok', data)
213219
})
214220
},
215221
__onCancel () {
216222
return this.hide().then(() => {
223+
console.log('DIALOG emitting cancel')
217224
this.$emit('cancel')
218225
})
219226
},

src/components/layout/QLayout.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export default {
6262
}
6363
},
6464
render (h) {
65+
console.log('layout render')
6566
return h('div', { staticClass: 'q-layout' }, [
6667
h(QScrollObservable, {
6768
on: { scroll: this.__onPageScroll }

src/components/layout/QLayoutDrawer.js

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,27 @@ export default {
3636
}
3737
},
3838
data () {
39-
const belowBreakpoint = (
40-
this.behavior === 'mobile' ||
41-
(this.behavior !== 'desktop' && this.breakpoint >= this.layout.width)
42-
)
39+
const largeScreenState = this.value !== void 0 ? this.value : true
40+
const showing = this.behavior !== 'mobile' && this.breakpoint < this.layout.width && !this.overlay
41+
? largeScreenState
42+
: false
43+
44+
if (this.value !== void 0 && this.value !== showing) {
45+
this.$emit('input', showing)
46+
}
47+
48+
console.log(`showing, largeScreenState, this.breakpoint, this.layout.width`)
49+
console.log(showing, largeScreenState, this.breakpoint, this.layout.width)
50+
console.log(`this.behavior !== 'mobile', this.breakpoint >= this.layout.width, !this.overlay`)
51+
console.log(this.behavior !== 'mobile', this.breakpoint >= this.layout.width, !this.overlay)
4352

4453
return {
45-
showing: true,
46-
belowBreakpoint,
47-
largeScreenState: this.value,
54+
showing,
55+
belowBreakpoint: (
56+
this.behavior === 'mobile' ||
57+
(this.behavior !== 'desktop' && this.breakpoint >= this.layout.width)
58+
),
59+
largeScreenState,
4860
mobileOpened: false,
4961

5062
size: 300,
@@ -55,18 +67,23 @@ export default {
5567
},
5668
watch: {
5769
belowBreakpoint (val, old) {
70+
console.log('belowBreakpoint: change detected', val)
5871
if (this.mobileOpened) {
72+
console.log('belowBreakpoint: mobile view is opened; aborting')
5973
return
6074
}
6175

6276
if (val) { // from lg to xs
77+
console.log('belowBreakpoint: from lg to xs; model force to false')
6378
if (!this.overlay) {
79+
console.log('belowBreakpoint: largeScreenState set to', this.showing)
6480
this.largeScreenState = this.showing
6581
}
6682
// ensure we close it for small screen
6783
this.hide()
6884
}
6985
else if (!this.overlay) { // from xs to lg
86+
console.log('belowBreakpoint: from xs to lg; model set to', this.largeScreenState)
7087
this[this.largeScreenState ? 'show' : 'hide']()
7188
}
7289
},
@@ -97,15 +114,18 @@ export default {
97114
}
98115
},
99116
onLayout (val) {
117+
console.log('onLayout', val)
100118
this.__update('space', val)
101119
this.layout.__animate()
102120
},
103121
$route () {
104122
if (this.mobileOpened) {
123+
console.log('$route watch closing')
105124
this.hide()
106125
return
107126
}
108127
if (this.onScreenOverlay) {
128+
console.log('$route watch updating model')
109129
this.hide()
110130
}
111131
}
@@ -211,6 +231,7 @@ export default {
211231
}
212232
},
213233
render (h) {
234+
console.log(`drawer ${this.side} render`)
214235
const child = []
215236

216237
if (this.mobileView) {
@@ -254,10 +275,8 @@ export default {
254275
]))
255276
},
256277
created () {
257-
if (this.belowBreakpoint || this.overlay) {
258-
this.hide()
259-
}
260-
else if (this.onLayout) {
278+
if (this.onLayout) {
279+
console.log('DRAWER on layout')
261280
this.__update('space', true)
262281
this.__update('offset', this.offset)
263282
}
@@ -325,7 +344,10 @@ export default {
325344
}
326345
},
327346
__show () {
347+
console.log('show', this.showing)
348+
328349
if (this.belowBreakpoint) {
350+
console.log('watcher value: opening mobile')
329351
this.mobileOpened = true
330352
this.percentage = 1
331353
}
@@ -343,6 +365,8 @@ export default {
343365
}, duration)
344366
},
345367
__hide () {
368+
console.log('hide', this.showing)
369+
346370
this.mobileOpened = false
347371
this.percentage = 0
348372
document.body.classList.remove(bodyClassAbove, bodyClassBelow)

src/components/layout/QLayoutFooter.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export default {
8282
}
8383
},
8484
render (h) {
85+
console.log('footer render')
8586
return h('footer', {
8687
staticClass: 'q-layout-footer q-layout-transition',
8788
'class': this.computedClass,

src/components/layout/QLayoutHeader.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ export default {
8686
}
8787
},
8888
render (h) {
89+
console.log('header render')
8990
return h('header', {
9091
staticClass: 'q-layout-header q-layout-transition',
9192
'class': this.computedClass,

src/components/layout/QPageSticky.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ export default {
9797
}
9898
},
9999
render (h) {
100+
console.log('sticky render')
100101
return h('div', {
101102
staticClass: 'q-page-sticky q-layout-transition z-fixed',
102103
'class': `fixed-${this.position}`,

src/components/modal/QModal.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,14 @@ export default {
126126
if (this.noBackdropDismiss) {
127127
return
128128
}
129+
console.log('MODAL __dismiss')
129130
this.hide().then(() => {
131+
console.log('MODAL __dismiss emitting dismiss')
130132
this.$emit('dismiss')
131133
})
132134
},
133135
__show () {
136+
console.log('MODAL __show')
134137
const body = document.body
135138

136139
body.appendChild(this.$el)
@@ -155,6 +158,7 @@ export default {
155158
})
156159
},
157160
__hide () {
161+
console.log('MODAL __hide')
158162
EscapeKey.pop()
159163
openedModalNumber--
160164

@@ -185,15 +189,19 @@ export default {
185189
},
186190
on: {
187191
afterEnter: () => {
192+
console.log('MODAL show resolve')
188193
this.showPromise && this.showPromiseResolve()
189194
},
190195
enterCancelled: () => {
196+
console.log('MODAL show cancel')
191197
this.showPromise && this.showPromiseReject()
192198
},
193199
afterLeave: () => {
200+
console.log('MODAL hide resolve')
194201
this.hidePromise && this.hidePromiseResolve()
195202
},
196203
leaveCancelled: () => {
204+
console.log('MODAL hide reject')
197205
this.hidePromise && this.hidePromiseReject()
198206
}
199207
}

src/components/modal/modal.mat.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ maximized-modal()
6262
transform scale(.8)
6363

6464
.modal, .modal-content
65-
transition all .2s ease-in-out
65+
transition all 2s ease-in-out
6666

6767
.modal-header
6868
text-align $modal-header-text-align

0 commit comments

Comments
 (0)