Commit c99d55ea authored by Tt's avatar Tt

图片过小bug处理

parent 8a02baf7
...@@ -299,6 +299,7 @@ cc.Class({ ...@@ -299,6 +299,7 @@ cc.Class({
//copy-start 把物品的父节点换到中间的box上。 //copy-start 把物品的父节点换到中间的box上。
const box_mid = cc.find('Canvas/bg/box_mid'); const box_mid = cc.find('Canvas/bg/box_mid');
optionNode.WH = { W: optionNode.width, H: optionNode.height };
if (optionNode.x >= 0) { if (optionNode.x >= 0) {
cc.tween(optionNode).to(0.2, { x: 0, y: 370 }, cc.easing.quadOut).call(() => { cc.tween(optionNode).to(0.2, { x: 0, y: 370 }, cc.easing.quadOut).call(() => {
optionNode.parent = box_mid; optionNode.parent = box_mid;
...@@ -469,8 +470,9 @@ cc.Class({ ...@@ -469,8 +470,9 @@ cc.Class({
.filter(child => child.optionData.selected) .filter(child => child.optionData.selected)
.forEach(child => { .forEach(child => {
child.optionData.selected = false; child.optionData.selected = false;
cc.tween(child) cc.tween(child)
.to(0.2, { x: child.startPos.x, y: child.startPos.y, scale: child.targetScale }) .to(0.2, { x: child.startPos.x, y: child.startPos.y, scale: child.targetScale, width: child.WH.W, height: child.WH.H })
.start(); .start();
}); });
...@@ -481,7 +483,7 @@ cc.Class({ ...@@ -481,7 +483,7 @@ cc.Class({
.forEach(child => { .forEach(child => {
child.optionData.selected = false; child.optionData.selected = false;
cc.tween(child) cc.tween(child)
.to(0.2, { x: child.startPos.x, y: child.startPos.y, scale: child.targetScale }) .to(0.2, { x: child.startPos.x, y: child.startPos.y, scale: child.targetScale, width: child.WH.W, height: child.WH.H })
.call(() => { .call(() => {
child.parent = box; child.parent = box;
}) })
......
...@@ -17,7 +17,8 @@ export const defaultData = { ...@@ -17,7 +17,8 @@ export const defaultData = {
"is_right": false "is_right": false
}, },
{ {
"pic_url": "http://staging-teach.cdn.ireadabc.com/48ecba3519b1d58a1fa434ae694fc831.png", "pic_url": "http://staging-teach.cdn.ireadabc.com/22459690af08bd31289d4a58f8501737.jpg",
//"http://staging-teach.cdn.ireadabc.com/48ecba3519b1d58a1fa434ae694fc831.png",
"audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3", "audio_url": "http://staging-teach.cdn.ireadabc.com/b4d95069fcc91976740461b9061a303a.mp3",
"is_right": false "is_right": false
}, },
......
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