Commit a2a8ee9a authored by rockyl's avatar rockyl

修复视图动效

parent 0b317c13
......@@ -79,7 +79,7 @@ const effects = {
const {duration = 300, direction = 'top', ease = 'backOut', inPos: inPosInput} = params;
const {stage: {width, height}} = gameStage;
let outPos: any;
let outPos: any = {};
switch (direction) {
case 'left':
outPos.x = -width;
......@@ -96,7 +96,7 @@ const effects = {
}
let inEase = ease;
let outEase = ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out');
let outEase = ease ? ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out') : '';
if (mutex) {
flewOut(() => {
......@@ -148,7 +148,7 @@ const effects = {
const {duration = 300, ease = 'backOut', x = 0, y = 0} = params;
let inEase = ease;
let outEase = ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out');
let outEase = ease ? ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out') : '';
let outPos = {
x: parseInt(x),
......@@ -214,7 +214,7 @@ const effects = {
const {duration = 300, ease = 'backOut'} = params;
let inEase = ease;
let outEase = ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out');
let outEase = ease ? ease.indexOf('Out') ? ease.replace('Out', 'In') : ease.replace('In', 'Out') : '';
if (mutex) {
zoomOut(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment