Working on stacked buttons.

This commit is contained in:
2019-07-30 16:56:29 +02:00
parent 0bcf931465
commit 5f46b4feae
115 changed files with 3277 additions and 5134 deletions
+18 -28
View File
@@ -258,28 +258,22 @@ export class DOMFlip {
frontLoaded(loader) {
return new Promise((resolve, reject) => {
let scatter = new DOMScatter(
this.cardWrapper,
this.domScatterContainer,
{
x: loader.x,
y: loader.y,
startScale: loader.scale,
scale: loader.scale,
maxScale: loader.maxScale,
minScale: loader.minScale,
width: loader.wantedWidth,
height: loader.wantedHeight,
rotation: loader.rotation,
translatable: this.translatable,
scalable: this.scalable,
rotatable: this.rotatable,
overdoScaling: this.overdoScaling,
tapDelegate: this.tapDelegateFactory
? this.tapDelegateFactory(this.cardWrapper)
: null
}
)
let scatter = new DOMScatter(this.cardWrapper, this.domScatterContainer, {
x: loader.x,
y: loader.y,
startScale: loader.scale,
scale: loader.scale,
maxScale: loader.maxScale,
minScale: loader.minScale,
width: loader.wantedWidth,
height: loader.wantedHeight,
rotation: loader.rotation,
translatable: this.translatable,
scalable: this.scalable,
rotatable: this.rotatable,
overdoScaling: this.overdoScaling,
tapDelegate: this.tapDelegateFactory ? this.tapDelegateFactory(this.cardWrapper) : null
})
if (this.center) {
scatter.centerAt(this.center)
@@ -296,9 +290,7 @@ export class DOMFlip {
//Remove callback
if (scatter.onTransform) {
let callbackIdx = scatter.onTransform.indexOf(
removeOnMinScale
)
let callbackIdx = scatter.onTransform.indexOf(removeOnMinScale)
scatter.onTransform.splice(callbackIdx, 1)
}
}
@@ -572,9 +564,7 @@ export class DOMFlippable {
this.flipped = !this.flipped
let targetY = this.flipped ? 180 : 0
let targetZ = this.flipped
? this.startAngle + this.targetRotation(this.startAngle)
: this.startAngle
let targetZ = this.flipped ? this.startAngle + this.targetRotation(this.startAngle) : this.startAngle
let targetScale = this.flipped ? this.wantedScale : this.startScale
let w = this.flipped ? this.wantedWidth : this.startWidth
let h = this.flipped ? this.wantedHeight : this.startHeight