diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index b10f96c..f9bd261 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -3082,8 +3082,8 @@ var global = this.global; // do a cheeky transform to get the mouse coords; - var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2], - a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5], + var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx, + a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty, id = 1 / (a00 * a11 + a01 * -a10); // set the mouse coords... return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id, @@ -3153,6 +3153,8 @@ this.onTouchEnd = this.onTouchEnd.bind(this); this.onTouchMove = this.onTouchMove.bind(this); this.last = 0; + + this.currentCursorStyle = "inherit"; }; // constructor @@ -3327,8 +3329,9 @@ // loop through interactive objects! var length = this.interactiveItems.length; - this.interactionDOMElement.style.cursor = 'inherit'; + + var cursor = 'inherit' var over = false; for (i = 0; i < length; i++) @@ -3350,7 +3353,7 @@ // looks like there was a hit! if(item.__hit && !over) { - if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; + if(item.buttonMode) cursor = item.defaultCursor; if(!item.interactiveChildren)over = true; @@ -3379,6 +3382,13 @@ // } // ---> } + + if( this.currentCursorStyle != cursor ) + { + this.currentCursorStyle = cursor; + this.interactionDOMElement.style.cursor = cursor; + } + }; /** diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index b10f96c..f9bd261 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -3082,8 +3082,8 @@ var global = this.global; // do a cheeky transform to get the mouse coords; - var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2], - a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5], + var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx, + a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty, id = 1 / (a00 * a11 + a01 * -a10); // set the mouse coords... return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id, @@ -3153,6 +3153,8 @@ this.onTouchEnd = this.onTouchEnd.bind(this); this.onTouchMove = this.onTouchMove.bind(this); this.last = 0; + + this.currentCursorStyle = "inherit"; }; // constructor @@ -3327,8 +3329,9 @@ // loop through interactive objects! var length = this.interactiveItems.length; - this.interactionDOMElement.style.cursor = 'inherit'; + + var cursor = 'inherit' var over = false; for (i = 0; i < length; i++) @@ -3350,7 +3353,7 @@ // looks like there was a hit! if(item.__hit && !over) { - if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; + if(item.buttonMode) cursor = item.defaultCursor; if(!item.interactiveChildren)over = true; @@ -3379,6 +3382,13 @@ // } // ---> } + + if( this.currentCursorStyle != cursor ) + { + this.currentCursorStyle = cursor; + this.interactionDOMElement.style.cursor = cursor; + } + }; /** diff --git a/src/pixi/InteractionData.js b/src/pixi/InteractionData.js index 4eb2d78..909fcbe 100644 --- a/src/pixi/InteractionData.js +++ b/src/pixi/InteractionData.js @@ -51,8 +51,8 @@ var global = this.global; // do a cheeky transform to get the mouse coords; - var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2], - a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5], + var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx, + a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty, id = 1 / (a00 * a11 + a01 * -a10); // set the mouse coords... return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id, diff --git a/bin/pixi.dev.js b/bin/pixi.dev.js index b10f96c..f9bd261 100644 --- a/bin/pixi.dev.js +++ b/bin/pixi.dev.js @@ -3082,8 +3082,8 @@ var global = this.global; // do a cheeky transform to get the mouse coords; - var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2], - a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5], + var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx, + a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty, id = 1 / (a00 * a11 + a01 * -a10); // set the mouse coords... return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id, @@ -3153,6 +3153,8 @@ this.onTouchEnd = this.onTouchEnd.bind(this); this.onTouchMove = this.onTouchMove.bind(this); this.last = 0; + + this.currentCursorStyle = "inherit"; }; // constructor @@ -3327,8 +3329,9 @@ // loop through interactive objects! var length = this.interactiveItems.length; - this.interactionDOMElement.style.cursor = 'inherit'; + + var cursor = 'inherit' var over = false; for (i = 0; i < length; i++) @@ -3350,7 +3353,7 @@ // looks like there was a hit! if(item.__hit && !over) { - if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; + if(item.buttonMode) cursor = item.defaultCursor; if(!item.interactiveChildren)over = true; @@ -3379,6 +3382,13 @@ // } // ---> } + + if( this.currentCursorStyle != cursor ) + { + this.currentCursorStyle = cursor; + this.interactionDOMElement.style.cursor = cursor; + } + }; /** diff --git a/src/pixi/InteractionData.js b/src/pixi/InteractionData.js index 4eb2d78..909fcbe 100644 --- a/src/pixi/InteractionData.js +++ b/src/pixi/InteractionData.js @@ -51,8 +51,8 @@ var global = this.global; // do a cheeky transform to get the mouse coords; - var a00 = worldTransform[0], a01 = worldTransform[1], a02 = worldTransform[2], - a10 = worldTransform[3], a11 = worldTransform[4], a12 = worldTransform[5], + var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx, + a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty, id = 1 / (a00 * a11 + a01 * -a10); // set the mouse coords... return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id, diff --git a/src/pixi/InteractionManager.js b/src/pixi/InteractionManager.js index 98ac26c..ac32f82 100644 --- a/src/pixi/InteractionManager.js +++ b/src/pixi/InteractionManager.js @@ -59,6 +59,8 @@ this.onTouchEnd = this.onTouchEnd.bind(this); this.onTouchMove = this.onTouchMove.bind(this); this.last = 0; + + this.currentCursorStyle = "inherit"; }; // constructor @@ -233,8 +235,9 @@ // loop through interactive objects! var length = this.interactiveItems.length; - this.interactionDOMElement.style.cursor = 'inherit'; + + var cursor = 'inherit' var over = false; for (i = 0; i < length; i++) @@ -256,7 +259,7 @@ // looks like there was a hit! if(item.__hit && !over) { - if(item.buttonMode) this.interactionDOMElement.style.cursor = item.defaultCursor; + if(item.buttonMode) cursor = item.defaultCursor; if(!item.interactiveChildren)over = true; @@ -285,6 +288,13 @@ // } // ---> } + + if( this.currentCursorStyle != cursor ) + { + this.currentCursorStyle = cursor; + this.interactionDOMElement.style.cursor = cursor; + } + }; /**