Fixed flipeffect bug.
This commit is contained in:
@@ -332,9 +332,13 @@ export class DOMFlip {
|
||||
}
|
||||
|
||||
start({ targetCenter = null } = {}) {
|
||||
console.log('start')
|
||||
this.flippable.showFront()
|
||||
if (this.preloadBack) {
|
||||
console.log('preloadBack')
|
||||
this.flippable.start({ duration: this.flipDuration, targetCenter })
|
||||
} else {
|
||||
console.log('no back preload')
|
||||
let back = this.cardWrapper.querySelector('.back')
|
||||
let flippable = this.flippable
|
||||
this.backLoader.load(back).then(loader => {
|
||||
@@ -542,6 +546,7 @@ export class DOMFlippable {
|
||||
|
||||
start({ targetCenter = null } = {}) {
|
||||
this.bringToFront()
|
||||
console.log('flippable start', this.flipped)
|
||||
if (!this.flipped) {
|
||||
this.startX = this.element._gsTransform.x
|
||||
this.startY = this.element._gsTransform.y
|
||||
|
||||
Reference in New Issue
Block a user