リビジョン | d5cd3943f09c2e3ca76ddb2959c911e6ff4a38d7 (tree) |
---|---|
日時 | 2015-12-11 00:04:49 |
作者 | itozyun <itozyun@user...> |
コミッター | itozyun |
Verison 0.6.201, X.UI.ScrollBox woring at IE5.5 well.
@@ -76,7 +76,6 @@ | ||
76 | 76 | /* browser bug fix */ |
77 | 77 | |
78 | 78 | zoom : 1; |
79 | - | |
80 | 79 | word-wrap : break-word; /* IE5.5?5?, Firefox3.5, Chrome1 Opera10.5 Safari1 */ |
81 | 80 | white-space : pre; /* CSS 2.0 */ |
82 | 81 | white-space : pre-wrap; /* CSS 2.1 */ |
@@ -207,7 +206,7 @@ | ||
207 | 206 | position : absolute; |
208 | 207 | overflow : hidden; |
209 | 208 | background : #000; |
210 | - background : rgba(0,0,0,0.5); | |
209 | + /* background : rgba(0,0,0,0.5); IE5.5 ietester でインジケーターに色がつかない、、、*/ | |
211 | 210 | } |
212 | 211 | .Root .ScrollBox-IndicatorV { |
213 | 212 | top : 0; |
@@ -246,7 +246,7 @@ function X_Node_CSS_parseColor( x ){ | ||
246 | 246 | |
247 | 247 | function X_Node_CSS_objToCssText( that, skipFilter ){ |
248 | 248 | var obj = that[ '_css' ], |
249 | - plain = X_EMPTY_OBJECT, | |
249 | + //plain = X_EMPTY_OBJECT, | |
250 | 250 | css = [], |
251 | 251 | n = -1, |
252 | 252 | p, v, specialFix, filterFix; |
@@ -260,7 +260,7 @@ function X_Node_CSS_objToCssText( that, skipFilter ){ | ||
260 | 260 | |
261 | 261 | for( p in obj ){ |
262 | 262 | // object の拡張に備えて plain なオブジェクトを用意し、そのメンバーと一致するものは処理の対象外。 |
263 | - if( plain[ p ] ) continue; | |
263 | + //if( plain[ p ] ) continue; | |
264 | 264 | |
265 | 265 | v = obj[ p ]; |
266 | 266 |
@@ -277,7 +277,7 @@ function X_Node_CSS_objToCssText( that, skipFilter ){ | ||
277 | 277 | }; |
278 | 278 | |
279 | 279 | if( filterFix ){ |
280 | - v = X_Node_CSS_objToIEFilterText( that, filterFix ); | |
280 | + v = X_Node_CSS_objToIEFilterText( that, filterFix, css ); | |
281 | 281 | if( v ){ |
282 | 282 | css[ ++n ] = 'filter:' + v; |
283 | 283 | }; |
@@ -314,13 +314,15 @@ X_Node_CSS_FILTER_FIX_PROPS = | ||
314 | 314 | } : |
315 | 315 | null; |
316 | 316 | |
317 | -function X_Node_CSS_objToIEFilterText( that, opt_css ){ | |
317 | +function X_Node_CSS_objToIEFilterText( that, opt_css, opt_cssList ){ | |
318 | 318 | var obj = opt_css || that[ '_css' ], |
319 | 319 | test = X_Node_CSS_FILTER_FIX_PROPS, |
320 | + css = {}, | |
320 | 321 | filters = [], |
321 | 322 | n = -1, |
322 | 323 | p, id, v, num, ary, params, i, l, dir, |
323 | 324 | afterUpdate, impossible; |
325 | + | |
324 | 326 | for( p in obj ){ |
325 | 327 | if( X_EMPTY_OBJECT[ p ] ) continue; |
326 | 328 |
@@ -332,7 +334,10 @@ function X_Node_CSS_objToIEFilterText( that, opt_css ){ | ||
332 | 334 | filters[ ++n ] = v; |
333 | 335 | break; |
334 | 336 | 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 ) +')'; | |
336 | 341 | break; |
337 | 342 | case 3 : //'boxShadow' : |
338 | 343 | // TODO カンマ区切りの複数指定 |
@@ -528,11 +533,11 @@ function X_Node_css( nameOrObj /* value */ ){ | ||
528 | 533 | // setter:object |
529 | 534 | if( X_Type_isObject( nameOrObj ) ){ |
530 | 535 | if( !css ) css = this[ '_css' ] = {}; |
531 | - plain = X_EMPTY_OBJECT; | |
536 | + //plain = X_EMPTY_OBJECT; | |
532 | 537 | camelize = X_Node_CSS_camelize; |
533 | 538 | flags = this[ '_flags' ]; |
534 | 539 | for( p in nameOrObj ){ |
535 | - if( plain[ p ] ) continue; | |
540 | + //if( plain[ p ] ) continue; | |
536 | 541 | name = camelize( p ); |
537 | 542 | v = nameOrObj[ p ]; |
538 | 543 | if( css[ name ] === v ) continue; |
@@ -51,7 +51,9 @@ function X_Node_animate( start, dest, duration, easing, lazyRelease, option ){ | ||
51 | 51 | |
52 | 52 | if( !obj ){ |
53 | 53 | 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, | |
55 | 57 | duration : 0 |
56 | 58 | //phase, lazyRelease, easing, follower, releaseNow |
57 | 59 | }; |
@@ -152,7 +154,7 @@ function X_Node_stop( option ){ | ||
152 | 154 | case 4 : // 強制停止(GPU転送予約) |
153 | 155 | case 7 : // アニメーション中 |
154 | 156 | 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; | |
156 | 158 | obj.startA = obj.destA = obj.a = 1; |
157 | 159 | }; // TODO 終了値で停止も,,, |
158 | 160 |
@@ -276,8 +278,8 @@ function X_NodeAnime_updateAnimations( e ){ | ||
276 | 278 | if( now < obj.destTime ){ |
277 | 279 | easing = obj.progress = obj.easing.fn( ( now - obj.startTime ) / obj.duration ); |
278 | 280 | 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, | |
281 | 283 | obj.a = ( obj.destA - obj.startA ) * easing + obj.startA, true ); |
282 | 284 | c = true; |
283 | 285 | break; |
@@ -1577,6 +1577,7 @@ var X_Node__commitUpdate = | ||
1577 | 1577 | that[ '_flags' ] |= X_NodeFlags_ACTUAL_LISTENING; |
1578 | 1578 | }; |
1579 | 1579 | |
1580 | + // ie8 では子要素に opacity が反映されないため、親要素の opacity を積算する | |
1580 | 1581 | ie8opacity = ie8opacity * ( that[ '_css' ] && 0 <= that[ '_css' ].opacity ? that[ '_css' ].opacity : 1 ); |
1581 | 1582 | |
1582 | 1583 | // 8. 更新の適用 |
@@ -1718,7 +1719,8 @@ var X_Node__commitUpdate = | ||
1718 | 1719 | var X_Node__updateRawNode = |
1719 | 1720 | X_UA_DOM.W3C ? |
1720 | 1721 | ( 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; | |
1722 | 1724 | |
1723 | 1725 | // textNode |
1724 | 1726 | if( !that[ '_tag' ] ){ |
@@ -1726,6 +1728,7 @@ var X_Node__updateRawNode = | ||
1726 | 1728 | that[ '_flags' ] &= X_Node_BitMask_RESET_DIRTY; |
1727 | 1729 | return; |
1728 | 1730 | }; |
1731 | + | |
1729 | 1732 | // id |
1730 | 1733 | if( that[ '_flags' ] & X_NodeFlags_DIRTY_ID ){ |
1731 | 1734 | that[ '_id' ] ? |
@@ -1792,6 +1795,7 @@ var X_Node__updateRawNode = | ||
1792 | 1795 | delete that[ '_newAttrs' ]; |
1793 | 1796 | }; |
1794 | 1797 | |
1798 | + | |
1795 | 1799 | if( accumulatedFlags & X_NodeFlags_IE8_OPACITY_FIX ){ |
1796 | 1800 | memory = that[ '_css' ] && that[ '_css' ].opacity; |
1797 | 1801 | if( f = true ){ |
@@ -26,7 +26,7 @@ function XUI_ScrollBox_start( scrollBox ){ | ||
26 | 26 | scrollBox.xnode[ 'append' ]( XUI_ScrollBox_indicatorV ); |
27 | 27 | XUI_ScrollBox_indicatorV[ 'animate' ]( |
28 | 28 | { opacity : 0 }, |
29 | - { opacity : 1 }, | |
29 | + { opacity : 0.5 }, | |
30 | 30 | 900, 'circular', 300 |
31 | 31 | ); |
32 | 32 | scrollBox |
@@ -46,7 +46,7 @@ function XUI_ScrollBox_start( scrollBox ){ | ||
46 | 46 | scrollBox.xnode[ 'append' ]( XUI_ScrollBox_indicatorH ); |
47 | 47 | XUI_ScrollBox_indicatorH[ 'animate' ]( |
48 | 48 | { opacity : 0 }, |
49 | - { opacity : 1 }, | |
49 | + { opacity : 0.5 }, | |
50 | 50 | 900, 'circular', 300 |
51 | 51 | ); |
52 | 52 | scrollBox |
@@ -66,7 +66,7 @@ function XUI_ScrollBox_indicatorHandleEvent( e ){ | ||
66 | 66 | case XUI_Event.SCROLL_END : |
67 | 67 | console.log( '-fadeout-' ); |
68 | 68 | this[ 'animate' ]( |
69 | - { opacity : 1 }, | |
69 | + { opacity : 0.5 }, | |
70 | 70 | { opacity : 0 }, |
71 | 71 | 900, 'circular', 300 |
72 | 72 | ); |
@@ -326,7 +326,7 @@ function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release | ||
326 | 326 | }, |
327 | 327 | { |
328 | 328 | y : scrollBoxH * y / that.scrollYMax, |
329 | - opacity : 1 | |
329 | + opacity : 0.5 | |
330 | 330 | }, |
331 | 331 | opt_time, opt_easing, opt_release |
332 | 332 | ); |
@@ -344,7 +344,7 @@ function X_UI_ScrollBox_translate( that, x, y, opt_time, opt_easing, opt_release | ||
344 | 344 | }, |
345 | 345 | { |
346 | 346 | x : scrollBoxW * x / that.scrollXMax, |
347 | - opacity : 1 | |
347 | + opacity : 0.5 | |
348 | 348 | }, |
349 | 349 | opt_time, opt_easing, opt_release |
350 | 350 | ); |