OSDN Git Service

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