/*\r
* pettanR common.js\r
- * version 0.4.33\r
+ * version 0.4.34\r
* \r
* author: itozyun\r
*/\r
})(),\r
vectorEnabled = ELM_BALLOON_ORIGIN !== null &&\r
pettanr.URL_PARAMS.vector !== false &&\r
- !( IS_VML === true && pettanr.ua.VML === false )\r
+ !( IS_VML === true && pettanr.ua.VML === false );\r
\r
var cos = Math.cos,\r
sin = Math.sin,\r
instance = this,\r
l = ',';\r
\r
- function draw( _a, _w, _h ){\r
- a = isFinit( _a ) === true ? _a : a;\r
- w = isFinit( _w ) === true ? _w - PADDING_TOP * 2 : w;\r
- h = isFinit( _h ) === true ? _h - PADDING_LEFT * 2 : h;\r
-\r
- if( vectorEnabled === false){\r
- balloonElm.setAttribute( 'src', pettanr.balloon.getBalloonUrl( w, h, _a ));\r
- return;\r
- }\r
- \r
+ function draw( _a ){\r
var rx = w / 2,\r
ry = h / 2,\r
tailRad = _a * DEG_TO_RAD,\r
if( IS_VML === true ){\r
var _tailX = tailX *10,\r
_tailY = tailY *10,\r
- __startX = startX *10,\r
- __startY = startY *10,\r
- __endX = endX *10,\r
- __endY = endY *10,\r
__w = w *10,\r
__h = h *10;\r
\r
shape.coordsize = [ __w, __h ].join( l );\r
shape.path = [\r
' ar ', 0, l, 0, l, __w, l, __h, l,\r
- round( __endX ), l, round( __endY ), l,\r
- round( __startX ), l, round( __startY ),\r
+ round( endX * 10 ), l, round( endY * 10 ), l,\r
+ round( startX * 10 ), l, round( startY * 10 ),\r
' l ', round( _tailX ), l, round( _tailY ),\r
' x e'\r
].join( '');\r
].join( ' '));\r
}\r
}\r
-\r
- draw( a, w, h );\r
\r
this.elm = balloonElm;\r
- this.resize = draw;\r
+ this.resize = function ( _a, _w, _h ){\r
+ w = isFinit( _w ) === true ? _w - PADDING_TOP * 2 : w;\r
+ h = isFinit( _h ) === true ? _h - PADDING_LEFT * 2 : h;\r
+ // ie6 でリサイズが反応しない対策\r
+ if( vectorEnabled === false && pettanr.ua.isIE === true && pettanr.ua.ieVersion < 7 ){\r
+ var parent = balloonElm.parentNode;\r
+ parent.removeChild( balloonElm );\r
+ parent.insertBefore( balloonElm, parent.firstChild );\r
+ }\r
+ instance.angle( _a );\r
+ };\r
this.angle = function( _a ){\r
- _a !== undefined && _a !== a &&\r
- vectorEnabled === false ? pettanr.balloon.getBalloonUrl( w, h, _a ) : draw( _a );\r
+ if( isFinit( _a ) === true ){\r
+ a = _a;\r
+ if( vectorEnabled === false ){\r
+ balloonElm.src = pettanr.balloon.getBalloonUrl( w, h, _a );\r
+ } else {\r
+ draw( _a );\r
+ }\r
+ }\r
return a;\r
}\r
this.type = function( _type ){\r
balloonElm.parentNode && balloonElm.parentNode.removeChild( balloonElm );\r
balloonElm = path = shape = instance = null;\r
}\r
+ \r
+ instance.resize( a, w, h );\r
};\r
\r
IS_VML === false && vectorEnabled === true && ( function(){\r
return [\r
pettanr.CONST.SYSTEM_PICTURE_PATH, '_w',\r
_a < 360 - d / 2 ? floor( _a / d ) : 0,\r
+ _w <= 400 || _h <= 400 ? '_b1' : '',\r
'.gif' ].join( '' );\r
},\r
TYPE_NONE: 0,\r