cocos2d / cocos2d-html5

Cocos2d for Web Browsers. Built using JavaScript.
https://www.cocos.com
3.07k stars 902 forks source link

studio's problem #2029

Closed feijing566 closed 10 years ago

feijing566 commented 10 years ago

1. ImageView's scale settings take effect no.

2. I update the code in cocos2d-html5\extensions\cocostudio\reader\widgetreader\LayoutReader. line 42: from "if (adaptScreen){" to "if (adaptScreen != null){".

but it make my UI's position error.

VisualSJ commented 10 years ago

Hi @feijing566

The problem is that we neglect.

WidgetReader.js 74th row has

var sx = options ["scalex"] | | 1;

It should be the correct:

var sx = options ["scaleX"] | | 1;

His restoration inside this PR: https://github.com/cocos2d/cocos2d-html5/commit/c604e494eca6f7915602d8e3c4dd1a86e7294521

About coordinate errors which may have been repaired in this PR: https://github.com/cocos2d/cocos2d-html5/commit/6e8086b4504f1f0372dd67ff5d1beb51d5429ebf

In addition, you can get some of the code from the git repository that we fixed some bug.

Thanks for u.

Welcome to send us a message. Thanks again

VisualSJ

feijing566 commented 10 years ago

hi @VisualSJ , I have updated the code from the git repository. But the problems still unsolved.

VisualSJ commented 10 years ago

Thank you for your feedback.

I really want to solve your problem, But I just don't know how to reproduce it. And we tested most material, couldn't find this problem. Can you give me a file to reproduce this problem? After reproduce the problem, we will fix it on first time...

My e-mail is: sijie.wang@chukong-inc.com

Sorry for the inconvenience caused to you...

VisualSJ

feijing566 commented 10 years ago

hi @VisualSJ , I think i find the problem. My ImageView's mode is custorm. and didn't set the scale.

vladkolotvin commented 10 years ago

@feijing566 Close this issue if you solved problem.

feijing566 commented 10 years ago

Hi @cruelbob ,@VisualSJ , It is a bug about the value of ignoreSize.

In cocostudio ignoreSize = true when auto mode,but in cocos2d-js ignoreSize = true means custorm mode.

you just change the code in cocos2d-html5\extensions\cocostudio\reader\widgetreader\WidgetReader.js Line 35: from if(ignoreSizeExsit){ to if(!ignoreSizeExsit){

and then problem will fix

Ps: If you use widget.clone, the clone's widget have to set ignoreSize aggin. in cocos2d-html5\extensions\ccui\base-classes\UIWidget.js Line 1225: replace the code: this._ignoreSize.width = widget._ignoreSize.width; this._ignoreSize.height = widget._ignoreSize.height; by this.ignoreContentAdaptWithSize(widget._ignoreSize);

because widget._ignoreSize is a boolen not a object.

I'm sorry , i don't know how to use githut to close this issue =_=!!!

dingpinglv commented 10 years ago

Thanks for your feedback.

"this._ignoreSize.width = widget._ignoreSize.width; this._ignoreSize.height = widget._ignoreSize.height;"

This issue has been fixed.

The problem in cocos2d-html5\extensions\cocostudio\reader\widgetreader\WidgetReader.js Line 35, We have changed the codes to: if(ignoreSizeExsit != null)

Bests David