From aba723bbfc7726abe8abc6a31f40f09278eea778 Mon Sep 17 00:00:00 2001 From: vincent Date: Wed, 6 Aug 2014 14:00:07 +0800 Subject: [PATCH] =?UTF-8?q?UIAssets=E5=AE=BD=E9=AB=98=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 宽高设置后无法还原的bug。 有这么一种情况,比如UIAsset.skinName是一个mc 这个mc第一帧无内容或宽或高为0,第10帧画有一个图形宽高200。那么mc的第10帧也显示不出来了。 --- src/org/flexlite/domUI/components/UIAsset.as | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/flexlite/domUI/components/UIAsset.as b/src/org/flexlite/domUI/components/UIAsset.as index 765847d..21ef6a5 100644 --- a/src/org/flexlite/domUI/components/UIAsset.as +++ b/src/org/flexlite/domUI/components/UIAsset.as @@ -307,8 +307,8 @@ package org.flexlite.domUI.components } else { - _skin.width = unscaledWidth; - _skin.height = unscaledHeight; + if(_skin.width != unscaledWidth)_skin.width = unscaledWidth; + if(_skin.height != unscaledHeight)_skin.height = unscaledHeight; if(_skin is IInvalidateDisplay) IInvalidateDisplay(_skin).validateNow(); } @@ -374,4 +374,4 @@ package org.flexlite.domUI.components throw(new Error("swapChildrenAt()"+errorStr+"swapElementsAt()代替")); } } -} \ No newline at end of file +}