• R/O
  • HTTP
  • SSH
  • HTTPS

clientJs: コミット

クライアント側 js 開発用


コミットメタ情報

リビジョンd5cd3943f09c2e3ca76ddb2959c911e6ff4a38d7 (tree)
日時2015-12-11 00:04:49
作者itozyun <itozyun@user...>
コミッターitozyun

ログメッセージ

Verison 0.6.201, X.UI.ScrollBox woring at IE5.5 well.

変更サマリ

差分

--- a/0.6.x/css/xui.css
+++ b/0.6.x/css/xui.css
@@ -76,7 +76,6 @@
7676 /* browser bug fix */
7777
7878 zoom : 1;
79-
8079 word-wrap : break-word; /* IE5.5?5?, Firefox3.5, Chrome1 Opera10.5 Safari1 */
8180 white-space : pre; /* CSS 2.0 */
8281 white-space : pre-wrap; /* CSS 2.1 */
@@ -207,7 +206,7 @@
207206 position : absolute;
208207 overflow : hidden;
209208 background : #000;
210- background : rgba(0,0,0,0.5);
209+ /* background : rgba(0,0,0,0.5); IE5.5 ietester でインジケーターに色がつかない、、、*/
211210 }
212211 .Root .ScrollBox-IndicatorV {
213212 top : 0;
--- a/0.6.x/js/02_dom/06_XNodeCSS.js
+++ b/0.6.x/js/02_dom/06_XNodeCSS.js
@@ -246,7 +246,7 @@ function X_Node_CSS_parseColor( x ){
246246
247247 function X_Node_CSS_objToCssText( that, skipFilter ){
248248 var obj = that[ '_css' ],
249- plain = X_EMPTY_OBJECT,
249+ //plain = X_EMPTY_OBJECT,
250250 css = [],
251251 n = -1,
252252 p, v, specialFix, filterFix;
@@ -260,7 +260,7 @@ function X_Node_CSS_objToCssText( that, skipFilter ){
260260
261261 for( p in obj ){
262262 // object の拡張に備えて plain なオブジェクトを用意し、そのメンバーと一致するものは処理の対象外。
263- if( plain[ p ] ) continue;
263+ //if( plain[ p ] ) continue;
264264
265265 v = obj[ p ];
266266
@@ -277,7 +277,7 @@ function X_Node_CSS_objToCssText( that, skipFilter ){
277277 };
278278
279279 if( filterFix ){
280- v = X_Node_CSS_objToIEFilterText( that, filterFix );
280+ v = X_Node_CSS_objToIEFilterText( that, filterFix, css );
281281 if( v ){
282282 css[ ++n ] = 'filter:' + v;
283283 };
@@ -314,13 +314,15 @@ X_Node_CSS_FILTER_FIX_PROPS =
314314 } :
315315 null;
316316
317-function X_Node_CSS_objToIEFilterText( that, opt_css ){
317+function X_Node_CSS_objToIEFilterText( that, opt_css, opt_cssList ){
318318 var obj = opt_css || that[ '_css' ],
319319 test = X_Node_CSS_FILTER_FIX_PROPS,
320+ css = {},
320321 filters = [],
321322 n = -1,
322323 p, id, v, num, ary, params, i, l, dir,
323324 afterUpdate, impossible;
325+
324326 for( p in obj ){
325327 if( X_EMPTY_OBJECT[ p ] ) continue;
326328
@@ -332,7 +334,10 @@ function X_Node_CSS_objToIEFilterText( that, opt_css ){
332334 filters[ ++n ] = v;
333335 break;
334336 case 2 : //'opacity' :
335- if( v !== 1 ) filters[ ++n ] = 'alpha(opacity=' + ( v * 100 | 0 ) +')';
337+ //if( v === 0 ){
338+ // opt_cssList && ( opt_cssList[ opt_cssList.length ] = 'visibility:hidden' );
339+ //} else
340+ if( v < 1 ) filters[ ++n ] = 'alpha(opacity=' + ( v * 100 | 0 ) +')';
336341 break;
337342 case 3 : //'boxShadow' :
338343 // TODO カンマ区切りの複数指定
@@ -528,11 +533,11 @@ function X_Node_css( nameOrObj /* value */ ){
528533 // setter:object
529534 if( X_Type_isObject( nameOrObj ) ){
530535 if( !css ) css = this[ '_css' ] = {};
531- plain = X_EMPTY_OBJECT;
536+ //plain = X_EMPTY_OBJECT;
532537 camelize = X_Node_CSS_camelize;
533538 flags = this[ '_flags' ];
534539 for( p in nameOrObj ){
535- if( plain[ p ] ) continue;
540+ //if( plain[ p ] ) continue;
536541 name = camelize( p );
537542 v = nameOrObj[ p ];
538543 if( css[ name ] === v ) continue;
--- a/0.6.x/js/02_dom/10_XNodeAnime.js
+++ b/0.6.x/js/02_dom/10_XNodeAnime.js
@@ -51,7 +51,9 @@ function X_Node_animate( start, dest, duration, easing, lazyRelease, option ){
5151
5252 if( !obj ){
5353 this[ '_anime' ] = obj = {
54- x : 0, y : 0, a : 1,
54+ x : X_NodeAnime_hasTransform ? 0 : NaN,
55+ y : X_NodeAnime_hasTransform ? 0 : NaN,
56+ a : 1,
5557 duration : 0
5658 //phase, lazyRelease, easing, follower, releaseNow
5759 };
@@ -152,7 +154,7 @@ function X_Node_stop( option ){
152154 case 4 : // 強制停止(GPU転送予約)
153155 case 7 : // アニメーション中
154156 if( option & X_NODE_ANIME_RESET ){
155- obj.startX = obj.startY = obj.destX = obj.destY = obj.x = obj.y = 0;
157+ obj.startX = obj.startY = obj.destX = obj.destY = obj.x = obj.y = X_NodeAnime_hasTransform ? 0 : NaN;
156158 obj.startA = obj.destA = obj.a = 1;
157159 }; // TODO 終了値で停止も,,,
158160
@@ -276,8 +278,8 @@ function X_NodeAnime_updateAnimations( e ){
276278 if( now < obj.destTime ){
277279 easing = obj.progress = obj.easing.fn( ( now - obj.startTime ) / obj.duration );
278280 X_NodeAnime_updatePosition( xnode,
279- obj.x = ( obj.destX - obj.startX ) * easing + obj.startX | 0,
280- obj.y = ( obj.destY - obj.startY ) * easing + obj.startY | 0,
281+ obj.x = ( obj.destX - obj.startX ) * easing + obj.startX,
282+ obj.y = ( obj.destY - obj.startY ) * easing + obj.startY,
281283 obj.a = ( obj.destA - obj.startA ) * easing + obj.startA, true );
282284 c = true;
283285 break;
--- a/0.6.x/js/02_dom/20_XNode.js
+++ b/0.6.x/js/02_dom/20_XNode.js
@@ -1577,6 +1577,7 @@ var X_Node__commitUpdate =
15771577 that[ '_flags' ] |= X_NodeFlags_ACTUAL_LISTENING;
15781578 };
15791579
1580+ // ie8 では子要素に opacity が反映されないため、親要素の opacity を積算する
15801581 ie8opacity = ie8opacity * ( that[ '_css' ] && 0 <= that[ '_css' ].opacity ? that[ '_css' ].opacity : 1 );
15811582
15821583 // 8. 更新の適用
@@ -1718,7 +1719,8 @@ var X_Node__commitUpdate =
17181719 var X_Node__updateRawNode =
17191720 X_UA_DOM.W3C ?
17201721 ( function( that, elm, ie8opacity, accumulatedFlags ){
1721- var attrs, rename, k, v, memory, f;
1722+ var // flags = that[ '_flags' ],
1723+ attrs, rename, k, v, memory, f;
17221724
17231725 // textNode
17241726 if( !that[ '_tag' ] ){
@@ -1726,6 +1728,7 @@ var X_Node__updateRawNode =
17261728 that[ '_flags' ] &= X_Node_BitMask_RESET_DIRTY;
17271729 return;
17281730 };
1731+
17291732 // id
17301733 if( that[ '_flags' ] & X_NodeFlags_DIRTY_ID ){
17311734 that[ '_id' ] ?
@@ -1792,6 +1795,7 @@ var X_Node__updateRawNode =
17921795 delete that[ '_newAttrs' ];
17931796 };
17941797
1798+
17951799 if( accumulatedFlags & X_NodeFlags_IE8_OPACITY_FIX ){
17961800 memory = that[ '_css' ] && that[ '_css' ].opacity;
17971801 if( f = true ){
--- a/0.6.x/js/20_ui/15_ScrollBox.js
+++ b/0.6.x/js/20_ui/15_ScrollBox.js
@@ -26,7 +26,7 @@ function XUI_ScrollBox_start( scrollBox ){
2626 scrollBox.xnode[ 'append' ]( XUI_ScrollBox_indicatorV );
2727 XUI_ScrollBox_indicatorV[ 'animate' ](
2828 { opacity : 0 },
29- { opacity : 1 },
29+ { opacity : 0.5 },
3030 900, 'circular', 300
3131 );
3232 scrollBox
@@ -46,7 +46,7 @@ function XUI_ScrollBox_start( scrollBox ){
4646 scrollBox.xnode[ 'append' ]( XUI_ScrollBox_indicatorH );
4747 XUI_ScrollBox_indicatorH[ 'animate' ](
4848 { opacity : 0 },
49- { opacity : 1 },
49+ { opacity : 0.5 },
5050 900, 'circular', 300
5151 );
5252 scrollBox
@@ -66,7 +66,7 @@ function XUI_ScrollBox_indicatorHandleEvent( e ){
6666 case XUI_Event.SCROLL_END :
6767 console.log( '-fadeout-' );
6868 this[ 'animate' ](
69- { opacity : 1 },
69+ { opacity : 0.5 },
7070 { opacity : 0 },
7171 900, 'circular', 300
7272 );
@@ -326,7 +326,7 @@ function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release
326326 },
327327 {
328328 y : scrollBoxH * y / that.scrollYMax,
329- opacity : 1
329+ opacity : 0.5
330330 },
331331 opt_time, opt_easing, opt_release
332332 );
@@ -344,7 +344,7 @@ function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release
344344 },
345345 {
346346 x : scrollBoxW * x / that.scrollXMax,
347- opacity : 1
347+ opacity : 0.5
348348 },
349349 opt_time, opt_easing, opt_release
350350 );
旧リポジトリブラウザで表示