X-Git-Url: http://git.osdn.jp/view?a=blobdiff_plain;f=0.6.x%2Fjs%2F02_dom%2F03_XDomEvent.js;h=98d86f01fabe4a4422a9e45cbcb9b8162ff5e948;hb=9e04e2a1221a92960a74e550bc3fd809caf3cd1c;hp=391cdb9667a891f2a009ae13ca72454e6281acd3;hpb=475df4df9670f042764a99c80d7716e994d28033;p=pettanr%2FclientJs.git diff --git a/0.6.x/js/02_dom/03_XDomEvent.js b/0.6.x/js/02_dom/03_XDomEvent.js index 391cdb9..98d86f0 100644 --- a/0.6.x/js/02_dom/03_XDomEvent.js +++ b/0.6.x/js/02_dom/03_XDomEvent.js @@ -12,7 +12,9 @@ // http://msdn.microsoft.com/ja-jp/library/ie/dn255104%28v=vs.85%29.aspx var X_Dom_Event_devicePixelRatio = window.devicePixelRatio || ( window.screen.deviceXDPI / window.screen.logicalXDPI ), - X_Dom_Event_convertMSPointerType = window.MSPointerEvent && [ 0, 0, 'touch', 'pen', 'mouse' ],/*{ + + X_Dom_Event_convertMSPointerType = ( !window.PointerEvent && window.MSPointerEvent ) && [ 0, 0, 'touch', 'pen', 'mouse' ], // WP8.1 は PointerEvent と MSPointerEvent 両方ある + /*{ '2' : 'touch', '3' : 'pen', '4' : 'mouse' @@ -62,7 +64,7 @@ if( !X_UA[ 'IE' ] || 9 <= X_UA[ 'IE' ] ){ this[ 'pressure' ] = e.pressure || ( e.button !== -1 ? 0.5 : 0 ); // ポインターの接触形状の スクリーン ピクセル単位の幅と高さ なので変換。(多分、、、) this[ 'width' ] = e.width / X_Dom_Event_devicePixelRatio; - this[ 'height' ] = e.height / X_Dom_Event_devicePixelRatio; + this[ 'height' ] = e.height / X_Dom_Event_devicePixelRatio; } else { this[ 'pointerType' ] = e.pointerType; this[ 'pressure' ] = e.pressure; @@ -320,6 +322,7 @@ if( !X_UA[ 'IE' ] || 9 <= X_UA[ 'IE' ] ){ if( type = X_Event_toPointer[ originalType ] ){ this[ 'type' ] = type; + this[ 'pointerType' ] = 'mouse'; this[ 'clientX' ] = e.clientX; this[ 'clientY' ] = e.clientY; //this[ 'screenX' ] = e.screenX;