チェンジセット 930
- コミット日時:
- 2008/07/31 01:52:02 (4 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
mxp/TransformationPoint/trunk/FlashCS3/src/TransformationPoint.mxi
r484 r930 2 2 <macromedia-extension 3 3 name="TransformationPoint" 4 version="1. 0.0"4 version="1.1.0" 5 5 type="flashpanel" 6 6 requires-restart="true"> … … 14 14 15 15 <description> 16 <![CDATA[This extension sets selected element's transformation point.]]> 16 <![CDATA[ 17 --------------------------------------<br> 18 Description : <br> 19 --------------------------------------<br> 20 This extension sets selected element's transformation point.<br> 21 <br> 22 NOTICE --<br> 23 This extension functions when "element.rotation" is -180,-135,-90,-45,0,45,90,135 and 180 degrees.<br> 24 <br> 25 <br> 26 Hosted by<br> 27 Spark project : http://www.libspark.org/<br> 28 <br> 29 TransformationPoint - Spark project<br> 30 http://www.libspark.org/wiki/e_s_jp/TransformationPoint<br> 31 ]]> 17 32 </description> 18 33 19 34 <ui-access> 20 <![CDATA[Access this panel by selecting "Window > Other Panels > TransformationPoint"]]> 35 <![CDATA[ 36 --------------------------------------<br> 37 UI-Access : <br> 38 --------------------------------------<br> 39 Access this panel by selecting "Window > Other Panels > TransformationPoint"<br> 40 <br> 41 ]]> 21 42 </ui-access> 22 43 … … 27 48 <files> 28 49 <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" /> 30 51 </files> 31 52 mxp/TransformationPoint/trunk/FlashCS3/src/TransformationPoint/TransformationPoint.jsfl
r484 r930 3 3 4 4 Flash CS3 extension "TrasformationPoint" 5 Version 1. 0.05 Version 1.1.0 6 6 author Eiji Saito 7 since 2008-05-11 8 update 2008-07-31 : Version 1.1.0 rotation & skew busgfix 7 9 8 10 WindowSWF/TrasformationPoint.swf … … 98 100 var selectionArray = doc.selection; 99 101 var len = selectionArray.length; 102 var noApplyLen = 0; 100 103 101 104 … … 104 107 //-------------------------------------- 105 108 settingsFlOutput( pointX, pointY, isCenter, isRatio ); 106 itemCntFlOutput( len );107 109 //-------------------------------------- 108 110 … … 110 112 for ( var i = 0 ; i < len ; i++ ) { 111 113 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 112 155 113 156 //-------------------------------------- … … 213 256 break; 214 257 } //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 215 271 } // end of for 216 272 … … 219 275 // FOR OUTPUT PANEL 220 276 //-------------------------------------- 277 itemCntFlOutput( len, noApplyLen ); 221 278 endFlOutput(); 222 279 //-------------------------------------- … … 387 444 388 445 389 function itemCntFlOutput( itemLength ) {446 function itemCntFlOutput( itemLength, noApplyCount ) { 390 447 var lenStr = " item"; 391 448 if ( itemLength > 1 ) { 392 449 lenStr += "s"; 393 450 } 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 ); 395 459 } 396 460
