Working on stacked buttons.
This commit is contained in:
+18
-28
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user