From 7dd71424555cb9bd5b8cabed6c089cbc583fbc22 Mon Sep 17 00:00:00 2001 From: Sebastian Kupke Date: Wed, 2 Oct 2019 14:09:09 +0200 Subject: [PATCH] Fixed flippable doctest. --- dist/iwmlib.js | 2 +- dist/iwmlib.pixi.js | 2 +- lib/flippable.html | 2 +- lib/flippable.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/iwmlib.js b/dist/iwmlib.js index 1e96e34..c3dbbf7 100644 --- a/dist/iwmlib.js +++ b/dist/iwmlib.js @@ -4980,7 +4980,7 @@ scalable: this.scalable, rotatable: this.rotatable, overdoScaling: this.overdoScaling, - tapDelegate: this.tapDelegateFactory ? this.tapDelegateFactory(this.cardWrapper) : null + tapDelegate: this.tapDelegateFactory ? new this.tapDelegateFactory(this.cardWrapper) : null }); if (this.center) { diff --git a/dist/iwmlib.pixi.js b/dist/iwmlib.pixi.js index 77464b9..f645d35 100644 --- a/dist/iwmlib.pixi.js +++ b/dist/iwmlib.pixi.js @@ -8278,7 +8278,7 @@ scalable: this.scalable, rotatable: this.rotatable, overdoScaling: this.overdoScaling, - tapDelegate: this.tapDelegateFactory ? this.tapDelegateFactory(this.cardWrapper) : null + tapDelegate: this.tapDelegateFactory ? new this.tapDelegateFactory(this.cardWrapper) : null }); if (this.center) { diff --git a/lib/flippable.html b/lib/flippable.html index 7966494..add8b31 100644 --- a/lib/flippable.html +++ b/lib/flippable.html @@ -73,7 +73,7 @@ if (Capabilities.supportsTemplate()) { flipTemplate, new ImageLoader('./examples/king.jpeg'), new ImageLoader('./examples/women.jpeg'), - { tapDelegateFactory: CardWrapper}) + { tapDelegateFactory: CardWrapper, preloadBack: true}) flip.load().then((flip) => { flip.centerAt({ x: 150, y: 120}) }) diff --git a/lib/flippable.js b/lib/flippable.js index fd03c16..9601aba 100644 --- a/lib/flippable.js +++ b/lib/flippable.js @@ -274,7 +274,7 @@ export class DOMFlip { scalable: this.scalable, rotatable: this.rotatable, overdoScaling: this.overdoScaling, - tapDelegate: this.tapDelegateFactory ? this.tapDelegateFactory(this.cardWrapper) : null + tapDelegate: this.tapDelegateFactory ? new this.tapDelegateFactory(this.cardWrapper) : null }) if (this.center) {