Commit a2a8ee9a authored by rockyl's avatar rockyl

修复视图动效

parent 0b317c13
...@@ -79,7 +79,7 @@ const effects = { ...@@ -79,7 +79,7 @@ const effects = {
const {duration = 300, direction = 'top', ease = 'backOut', inPos: inPosInput} = params; const {duration = 300, direction = 'top', ease = 'backOut', inPos: inPosInput} = params;
const {stage: {width, height}} = gameStage; const {stage: {width, height}} = gameStage;
let outPos: any; let outPos: any = {};
switch (direction) { switch (direction) {
case 'left': case 'left':
outPos.x = -width; outPos.x = -width;
...@@ -96,7 +96,7 @@ const effects = { ...@@ -96,7 +96,7 @@ const effects = {
} }
let inEase = ease; 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) { if (mutex) {
flewOut(() => { flewOut(() => {
...@@ -148,7 +148,7 @@ const effects = { ...@@ -148,7 +148,7 @@ const effects = {
const {duration = 300, ease = 'backOut', x = 0, y = 0} = params; const {duration = 300, ease = 'backOut', x = 0, y = 0} = params;
let inEase = ease; 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 = { let outPos = {
x: parseInt(x), x: parseInt(x),
...@@ -214,7 +214,7 @@ const effects = { ...@@ -214,7 +214,7 @@ const effects = {
const {duration = 300, ease = 'backOut'} = params; const {duration = 300, ease = 'backOut'} = params;
let inEase = ease; 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) { if (mutex) {
zoomOut(() => { 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