Fixed flipeffect bug.

This commit is contained in:
2019-10-02 15:00:08 +02:00
parent 7dd7142455
commit ce25b1dbae
5 changed files with 24 additions and 9 deletions
+5
View File
@@ -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