チェンジセット 930

差分発生行の前後
無視リスト:
コミット日時:
2008/07/31 01:52:02 (4 ヶ月前)
コミッタ:
e_s_jp
ログメッセージ:

version 1.1.0コミット

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • mxp/TransformationPoint/trunk/FlashCS3/src/TransformationPoint.mxi

    r484 r930  
    22<macromedia-extension 
    33         name="TransformationPoint" 
    4          version="1.0.0" 
     4         version="1.1.0" 
    55         type="flashpanel" 
    66         requires-restart="true"> 
     
    1414 
    1515        <description> 
    16                 <![CDATA[This extension sets selected element's transformation point.]]> 
     16                <![CDATA[ 
     17--------------------------------------<br> 
     18Description : <br> 
     19--------------------------------------<br> 
     20This extension sets selected element's transformation point.<br> 
     21<br> 
     22NOTICE --<br> 
     23This extension functions when "element.rotation" is -180,-135,-90,-45,0,45,90,135 and 180 degrees.<br> 
     24<br> 
     25<br> 
     26Hosted by<br> 
     27Spark project : http://www.libspark.org/<br> 
     28<br> 
     29TransformationPoint - Spark project<br> 
     30http://www.libspark.org/wiki/e_s_jp/TransformationPoint<br> 
     31]]> 
    1732        </description> 
    1833 
    1934        <ui-access> 
    20                 <![CDATA[Access this panel by selecting "Window > Other Panels > TransformationPoint"]]> 
     35                <![CDATA[ 
     36--------------------------------------<br> 
     37UI-Access : <br> 
     38--------------------------------------<br> 
     39Access this panel by selecting "Window > Other Panels > TransformationPoint"<br> 
     40<br> 
     41]]> 
    2142        </ui-access> 
    2243 
     
    2748        <files> 
    2849                <file source="TransformationPoint.swf" destination="$Flash/WindowSWF" /> 
    29                 <file source="TransformationPoint.jsfl" destination="$Flash/WindowSWF/TransformationPoint" /> 
     50                <file source="TransformationPoint/TransformationPoint.jsfl" destination="$Flash/WindowSWF/TransformationPoint" /> 
    3051        </files> 
    3152 
  • mxp/TransformationPoint/trunk/FlashCS3/src/TransformationPoint/TransformationPoint.jsfl

    r484 r930  
    33         
    44        Flash CS3 extension "TrasformationPoint" 
    5         Version 1.0.0 
     5        Version 1.1.0 
    66        author Eiji Saito 
     7        since  2008-05-11 
     8        update 2008-07-31 : Version 1.1.0 rotation & skew busgfix 
    79         
    810        WindowSWF/TrasformationPoint.swf 
     
    98100        var selectionArray = doc.selection; 
    99101        var len = selectionArray.length; 
     102        var noApplyLen = 0; 
    100103         
    101104         
     
    104107        //-------------------------------------- 
    105108        settingsFlOutput( pointX, pointY, isCenter, isRatio ); 
    106         itemCntFlOutput( len ); 
    107109        //-------------------------------------- 
    108110         
     
    110112        for ( var i = 0 ; i < len ; i++ ) { 
    111113                var element = selectionArray[ i ]; 
     114                 
     115                //-------------------------------------- 
     116                //  CHECK ROTATION & SKEW 
     117                //-------------------------------------- 
     118                 
     119                // value of element's rotation  -180 ~ 180 
     120                var orgElementRotation = element.rotation; 
     121                 
     122                 
     123                // check skew 
     124                if( isNaN( orgElementRotation) ) { 
     125                        noApplyLen++; 
     126                        continue; 
     127                } 
     128                 
     129                // ajust rotation 
     130                var val1 = Math.abs( Math.round( orgElementRotation ) ); 
     131                var val2 = Math.abs( orgElementRotation ); 
     132                 
     133                if( Math.abs( val1 - val2 ) < 0.1 ) { 
     134                        orgElementRotation = Math.round(orgElementRotation); 
     135                } 
     136                 
     137                // check 45 90 135 -45 -90 -135- 
     138                if ( ( orgElementRotation % 45 ) != 0 ) { 
     139                        noApplyLen++; 
     140                        continue; 
     141                } 
     142                 
     143                 
     144                //-------------------------------------- 
     145                //  SAVE ORIGINAL TRANSFORM 
     146                //-------------------------------------- 
     147                var orgElementScX = element.scaleX; 
     148                var orgElementScY = element.scaleY; 
     149                var orgElementX = element.x; 
     150                var orgElementY = element.y; 
     151                 
     152                // reset rotation 
     153                element.rotation = 0; 
     154                 
    112155                 
    113156                //-------------------------------------- 
     
    213256                                break; 
    214257                } //end of switch 
     258                 
     259                 
     260                 
     261                //-------------------------------------- 
     262                //  APPLY ORIGINAL TRANSFORM 
     263                //-------------------------------------- 
     264                 
     265                element.rotation = orgElementRotation; 
     266                element.scaleX = orgElementScX; 
     267                element.scaleY = orgElementScY; 
     268                element.x = orgElementX; 
     269                element.y = orgElementY; 
     270                 
    215271        } // end of for 
    216272         
     
    219275        //  FOR OUTPUT PANEL 
    220276        //-------------------------------------- 
     277        itemCntFlOutput( len, noApplyLen ); 
    221278        endFlOutput(); 
    222279        //-------------------------------------- 
     
    387444 
    388445 
    389 function itemCntFlOutput( itemLength) { 
     446function itemCntFlOutput( itemLength, noApplyCount ) { 
    390447        var lenStr = " item"; 
    391448        if ( itemLength > 1 ) { 
    392449                lenStr += "s"; 
    393450        } 
    394         fl.trace( "\t" + itemLength + lenStr ); 
     451        fl.trace( "\t" + "selected : " + itemLength + lenStr ); 
     452         
     453        var applyCount = itemLength - noApplyCount; 
     454        var cntStr = " item"; 
     455        if ( applyCount > 1 ) { 
     456                cntStr += "s"; 
     457        } 
     458        fl.trace( "\t" + " applied : " + applyCount + cntStr ); 
    395459} 
    396460