X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=public%2Fassets%2Fcommon.js;h=3711638aa4eb97f84a371c21ac4bd04a09956385;hb=3427c89d6e1abffb2e04e8940c9f870414c64e96;hp=da0a9e5d8c74baa243c71bb04aaa318f969fc84e;hpb=2dc4a19e472009653fdeddd554debd0b744de8ef;p=pettanr%2Fpettanr.git diff --git a/public/assets/common.js b/public/assets/common.js index da0a9e5d..3711638a 100644 --- a/public/assets/common.js +++ b/public/assets/common.js @@ -1109,7 +1109,7 @@ pettanr.key = ( function(){ overlayEnabled = pettanr.overlay.visible === true, currentViewID = overlayEnabled === true ? pettanr.overlay.currentID : pettanr.view.currentID; if( type === 'keypress') type = 'keydown'; - if( pettanr.form.keyEventRellay( e ) === false ){ + if( pettanr.form.keyEventRellay( e ) === false ){ var shift = e.shiftKey, ctrl = e.ctrlKey, l = KEYEVENT_ARRAY.length, @@ -1855,18 +1855,19 @@ pettanr.balloon = ( function() { draw( a, w, h ); function draw( _a, _w, _h ){ - a = _a !== undefined ? _a : a; - w = _w !== undefined ? _w - PADDING_TOP * 2 : w; - h = _h !== undefined ? _h - PADDING_LEFT * 2 : h; + a = _a !== undefined ? _a : a; + _a = a;// - 90; + w = _w !== undefined ? _w - PADDING_TOP * 2 : w; + h = _h !== undefined ? _h - PADDING_LEFT * 2 : h; if( vectorEnabled === false){ - balloonElm.setAttribute( 'src', balloonUrlBuilder( a )); + balloonElm.setAttribute( 'src', balloonUrlBuilder( _a )); return; } var rx = w /2, ry = h /2, - tailRad = a * DEG_TO_RAD, + tailRad = _a * DEG_TO_RAD, tailX = rx +( rx +TAIL_HEIGHT ) * cos( tailRad ), tailY = ry +( ry +TAIL_HEIGHT ) * sin( tailRad ), startX, startY, endX, endY; @@ -1879,8 +1880,8 @@ pettanr.balloon = ( function() { for( var i = 45; i > 0.01; i /= 2){ d = ( tailDeg + i ) /2; - startRad = ( a + d ) * DEG_TO_RAD; - endRad = ( a - d ) * DEG_TO_RAD; + startRad = ( _a + d ) * DEG_TO_RAD; + endRad = ( _a - d ) * DEG_TO_RAD; _startX = rx +cos( startRad ) * rx; _startY = ry +sin( startRad ) * ry; @@ -1942,7 +1943,7 @@ pettanr.balloon = ( function() { function balloonUrlBuilder( _a ){ var d = 360 / NUM_BALLOON_IMAGE; - _a += 90 + d / 2; + _a = ( _a >= _a ? _a : _a + 360 ) + d / 2; return [ 'system_pictures\/_w', _a < 360 - d / 2 ? floor( _a / d ) : 0, '.gif' ].join( '' ); } this.elm = balloonElm; @@ -2057,7 +2058,7 @@ pettanr.image = ( function(){ timer = window.setTimeout( asyncCallback, 10 ); } function onLoad(){ - // if( finish === true ) return; // これがあると firefox3.6 で駄目、、、 + // if( finish === true ) return; // これがあると firefox3.6 で駄目、、、 // if( timer ) return; // これがあると safari3.2 で駄目、、、 finish = true; timer !== null && window.clearTimeout( timer );