Skip to content

Commit d036baf

Browse files
committed
refactor(morph): onReady -> onEnd(dir, aborted)
1 parent 19e7c29 commit d036baf

File tree

14 files changed

+33
-25
lines changed

14 files changed

+33
-25
lines changed

docs/src/examples/MorphUtils/ImageGallery.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default {
120120
duration: 400,
121121
hideFromClone: true,
122122
style: 'z-index: 2002',
123-
onReady: end => {
123+
onEnd: end => {
124124
if (end === 'from' && this.indexZoomed === index) {
125125
this.indexZoomed = void 0
126126
}
@@ -142,7 +142,7 @@ export default {
142142
duration: 200,
143143
keepToClone: true,
144144
style: 'z-index: 2002',
145-
onReady: zoom
145+
onEnd: zoom
146146
})
147147
}
148148
else {

docs/src/examples/MorphUtils/ImageStripHorizontal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
},
4242
duration: 500,
4343
style: 'z-index: 1',
44-
onReady: end => {
44+
onEnd: end => {
4545
if (end === 'from' && this.indexZoomed === index) {
4646
this.indexZoomed = void 0
4747
}

docs/src/examples/MorphUtils/ImageStripVertical.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export default {
4141
},
4242
duration: 500,
4343
style: 'z-index: 1',
44-
onReady: end => {
44+
onEnd: end => {
4545
if (end === 'from' && this.indexZoomed === index) {
4646
this.indexZoomed = void 0
4747
}

docs/src/examples/MorphUtils/SameElement.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
onToggle,
7272
duration: 500,
7373
tween: true,
74-
onReady: end => {
74+
onEnd: end => {
7575
end === 'from' && onToggle()
7676
}
7777
})
@@ -91,7 +91,7 @@ export default {
9191
tween: true,
9292
tweenFromOpacity: 0.8,
9393
tweenToOpacity: 0.4,
94-
onReady: end => {
94+
onEnd: end => {
9595
end === 'from' && onToggle()
9696
}
9797
})

docs/src/pages/quasar-utils/morph-utils.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The function expects one mandatory Object parameter with the following keys:
4545
| tween | Boolean | *false* | By default the final element is morphed from the position and aspect of the initial element to the ones of the final element - set this flag to use an opacity tween between the initial and final elements |
4646
| tweenFromOpacity | Number | 0.6 | If using **tween** it is the initial opacity of the initial element (will be animated to 0) - the initial element is placed on top of the destination element |
4747
| tweenToOpacity | Number | 0.5 | If using **tween** it is the initial opacity of the destination element (will be animated to 1) |
48-
| onReady | Function | - | A function that will be called once the morphing is finished - receives a single string parameter ('to' if the morphing was finished in the final state or 'from' if it was finished in the initial state) |
48+
| onEnd(direction, aborted) | Function | - | A function that will be called once the morphing is finalized - receives two params: "direction" is a string ('to' if the morphing was finished in the final state or 'from' if it was finished in the initial state) and "aborted" is a boolean (true means that the animation was aborted) |
4949

5050
## Morphing lifecycle
5151

ui/dev/src/pages/other/morph-1.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export default {
207207
tween: this.tween,
208208
tweenFromOpacity: 1,
209209
tweenToOpacity: 0.5,
210-
onReady: end => {
210+
onEnd: end => {
211211
end === 'from' && onToggle()
212212
console.log('Morph 1 ready: ' + end)
213213
}
@@ -227,7 +227,7 @@ export default {
227227
resize: this.forceResize,
228228
useCSS: this.forceCssAnimation,
229229
classes: 'bg-orange',
230-
onReady: end => {
230+
onEnd: end => {
231231
end === 'from' && onToggle()
232232
console.log('Morph 2 ready: ' + end)
233233
}

ui/dev/src/pages/other/morph-img-1.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default {
8181
duration: 400,
8282
hideFromClone: true,
8383
style: 'z-index: 1',
84-
onReady: end => {
84+
onEnd: end => {
8585
if (end === 'from' && this.indexZoomed === index) {
8686
this.indexZoomed = void 0
8787
}
@@ -101,7 +101,7 @@ export default {
101101
duration: 200,
102102
keepToClone: true,
103103
style: 'z-index: 1',
104-
onReady: zoom
104+
onEnd: zoom
105105
})
106106
}
107107
else {

ui/dev/src/pages/other/morph-img-2.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
onToggle: () => { this.indexZoomed = index },
4040
duration: 500,
4141
style: 'z-index: 1',
42-
onReady: end => {
42+
onEnd: end => {
4343
if (end === 'from' && this.indexZoomed === index) {
4444
this.indexZoomed = void 0
4545
}

ui/dev/src/pages/other/morph-img-3.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default {
3939
onToggle: () => { this.indexZoomed = index },
4040
duration: 500,
4141
style: 'z-index: 1',
42-
onReady: end => {
42+
onEnd: end => {
4343
if (end === 'from' && this.indexZoomed === index) {
4444
this.indexZoomed = void 0
4545
}

ui/dev/src/pages/other/morph-same-element.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export default {
7171
onToggle: toggleLogic,
7272
duration: 500,
7373
tween: true,
74-
onReady: end => {
74+
onEnd: end => {
7575
end === 'from' && toggleLogic()
7676
}
7777
})
@@ -91,7 +91,7 @@ export default {
9191
tween: true,
9292
tweenFromOpacity: 0.8,
9393
tweenToOpacity: 0.4,
94-
onReady: end => {
94+
onEnd: end => {
9595
end === 'from' && toggleLogic()
9696
}
9797
})

0 commit comments

Comments
 (0)