Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebasing on dev to get MockPointer changes for #3375 #3546

Merged
merged 39 commits into from
Jan 27, 2017

Conversation

starakaj
Copy link
Contributor

@starakaj starakaj commented Jan 5, 2017

Basically making a new PR for #3375 so that it can pick up MockPointer changes

…moved an extraneous line in InteractionManager.js
… mixin for interactiveTarget will always set this
…moved an extraneous line in InteractionManager.js
… mixin for interactiveTarget will always set this
* 'dev' of github.com:starakaj/pixi.js:
  Removed an unnecessary check for _touchCount === undefined, since the mixin for interactiveTarget will always set this
  See pixijs#2662 --- Added _touchCount to interactiveTarget.js, and removed an extraneous line in InteractionManager.js
  See pixijs#2662 --- bending to the will of eslint
  Fix issue pixijs#2662 Added a touch counter instead of flag to ensure the correct touch count
* 'dev' of https://github.com/pixijs/pixi.js:
  Adds quotes around fontFamily (pixijs#3352)
  Fixes links to docs (pixijs#3324)
  Fixes the readme for bundle building excludes (pixijs#3325)
  Bower main fix, "bin" renamed "dist" (pixijs#3332)
  Expose the PIXI.Bounds class again (pixijs#3333)
  Update documentation (pixijs#3337)
  fixed settings not being respected (pixijs#3315)
  v4.2.2
…ts. Also updated InteractiveTarget to handle multiple touch or pointer events by recording pointerId for all tracked events, rather than just counting events. Finally, InteractionManager now updates on all tracked events, rather than just mouse events, so it should send move events when UI objects move underneath any held event, not just the mouse
…malized events for TouchEvents with multiple changedtouches
…os---trying to read pointerId from un-normalized events
…ight down are pointer properties, not mouse properties.
…that this is bound correctly, so that DisplayObjects can each get a unique object for tracking pointers
…d released InteractionData after touch up/cancelled events
* 'dev' of https://github.com/pixijs/pixi.js: (23 commits)
  Adds predist and prelib (pixijs#3441)
  Change the lines order in updateTransform. (pixijs#3435)
  fix for regular transform (pixijs#3424)
  Customize rendering process with "pluginName" field. (pixijs#3413)
  Change the code lines order in updateTransform in TransformStatic.js (pixijs#3404)
  Text style fixes (pixijs#3405)
  Further arc tests
  resolves pixijs#2016
  Add Ellipse method unit tests
  Fixed createColoredCanvas() documentation
  Graphics - getLocalBounds after generateCanvasTexture (pixijs#3398)
  Reduce Graphics.getlocalBounds test (pixijs#3397)
  better code
  cocoonJS interaction position fix
  use private field
  fixed tests
  derp 0.01 -> 0.1
  test description
  Fix for order of skew and scale in transform, plus a test
  v4.2.3
  ...
…ointerType mouse or touch by emitting mouse and touch events, respectively
* 'dev' of https://github.com/pixijs/pixi.js:
  Update `clear` for a more thorough cleaning (pixijs#3445)
  added InteractionManager tests (pixijs#3472)
  Test case & fix for Graphics._calculateBounds calling updateLocalBounds every time (pixijs#3444)
  Do not unload generated textures when manually running the texture garbage collector. This already happens when it is run automatically, as it will cause the texture to not be able to be renderered again (pixijs#3342)
  v4.3.0
  Allow '0x' notation of colours via strings to work in Text class (pixijs#3341)
  Add parameter kernelSize for blur filters. (pixijs#3410)
  target clarification (pixijs#3470)
  Fixes logic for spritesheet resolution (pixijs#3464)
  expose moveWhenInside docs (pixijs#3471)
…xijs#3375)

* Fix issue pixijs#2662 Added a touch counter instead of flag to ensure the correct touch count

* See pixijs#2662 --- bending to the will of eslint

* See pixijs#2662 --- Added _touchCount to interactiveTarget.js, and removed an extraneous line in InteractionManager.js

* Removed an unnecessary check for _touchCount === undefined, since the mixin for interactiveTarget will always set this

* Fix issue pixijs#2662 Added a touch counter instead of flag to ensure the correct touch count

* See pixijs#2662 --- bending to the will of eslint

* See pixijs#2662 --- Added _touchCount to interactiveTarget.js, and removed an extraneous line in InteractionManager.js

* Removed an unnecessary check for _touchCount === undefined, since the mixin for interactiveTarget will always set this

* Adding cancel events to interaction manager

* Refactoring InteractionManager to normalize all events to PointerEvents. Also updated InteractiveTarget to handle multiple touch or pointer events by recording pointerId for all tracked events, rather than just counting events. Finally, InteractionManager now updates on all tracked events, rather than just mouse events, so it should send move events when UI objects move underneath any held event, not just the mouse

* Typo: mouse is not a function

* InteractionManager normalizeToPointerData now returns an array of normalized events for TouchEvents with multiple changedtouches

* Typo: no such thing as onPointerStart

* Fixing some more typos: trying to read the pointerId of un-normalized events

* Typos: un-normalized events don't have a pointerType

* Added identifier property to InteractionData, and got rid of some typos---trying to read pointerId from un-normalized events

* Forgot to bind onPointerCancel

* Refactoring interactiveTarget.js a bit, so that over, left down and right down are pointer properties, not mouse properties.

* Forgot an export default

* Changed the mixin pattern for Pixi.interaction.interactiveTarget, so that this is bound correctly, so that DisplayObjects can each get a unique object for tracking pointers

* Fixed some typos, moved interactiveTarget back to being an object, and released InteractionData after touch up/cancelled events

* Small fixed

* Safari compatibility

* hasOwnProperty fix

* Safer to use a string for mouse pointer than a number

* InteractionManager should now handle native DOM pointer events with pointerType mouse or touch by emitting mouse and touch events, respectively

* InteractionManager test now respects the refactored spec for InteractionManager

* Pointer events exclusive

* String.startsWith is not available in all browsers esp. older version of Safari. As it's just used in one place we can use a RegExp here too

* Moving from regex, slightly faster
* dev: (30 commits)
  Moving from regex, slightly faster
  String.startsWith is not available in all browsers esp. older version of Safari. As it's just used in one place we can use a RegExp here too
  Pointer events exclusive
  InteractionManager test now respects the refactored spec for InteractionManager
  InteractionManager should now handle native DOM pointer events with pointerType mouse or touch by emitting mouse and touch events, respectively
  Safer to use a string for mouse pointer than a number
  hasOwnProperty fix
  Safari compatibility
  Small fixed
  Fixed some typos, moved interactiveTarget back to being an object, and released InteractionData after touch up/cancelled events
  Changed the mixin pattern for Pixi.interaction.interactiveTarget, so that this is bound correctly, so that DisplayObjects can each get a unique object for tracking pointers
  Forgot an export default
  Refactoring interactiveTarget.js a bit, so that over, left down and right down are pointer properties, not mouse properties.
  Forgot to bind onPointerCancel
  Added identifier property to InteractionData, and got rid of some typos---trying to read pointerId from un-normalized events
  Typos: un-normalized events don't have a pointerType
  Fixing some more typos: trying to read the pointerId of un-normalized events
  Typo: no such thing as onPointerStart
  InteractionManager normalizeToPointerData now returns an array of normalized events for TouchEvents with multiple changedtouches
  Typo: mouse is not a function
  ...
@starakaj
Copy link
Contributor Author

starakaj commented Jan 5, 2017

@bigtimebuddy does this work?

@bigtimebuddy
Copy link
Member

Looks like it's still failing on these tests: https://travis-ci.org/pixijs/pixi.js/builds/189202921#L639-L662 can you take a look at that. Maybe @staff0rd can help.

@starakaj
Copy link
Contributor Author

starakaj commented Jan 5, 2017

Yeah, it looks like some tests got added that have a different spec from the changes I made. I'll look at this today.

@staff0rd
Copy link
Collaborator

I forked @starakaj's branch, and tried to make a PR, but result looks like i'm trying to push all commits since his last rebase into the branch also. Not sure what I should do here, the fix for the tests is in this commit;

staff0rd@f71055e

@themoonrat themoonrat added Domain: API 💾 v4.x (Legacy) Legacy version 4 support labels Jan 19, 2017
@bigtimebuddy bigtimebuddy added this to the v4.4 milestone Jan 19, 2017
@bigtimebuddy
Copy link
Member

@starakaj could you incorporate @staff0rd's fix? We would really like to get this into our 4.4 release. Thanks for all your help.

@starakaj
Copy link
Contributor Author

starakaj commented Jan 20, 2017 via email

@starakaj
Copy link
Contributor Author

Cool, let me know if you need anything else!

Copy link
Contributor

@andrewstart andrewstart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still looks good to me.

* @private
*/
_pointerOver: false,
getTrackedPointers: function getTrackedPointers()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If mixins had the capability, would we want this to be get trackedPointers() instead of getTrackedPointers()? I'm just wondering for future changes (that I am making).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so!

Copy link
Collaborator

@staff0rd staff0rd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too legit ✌️

@lock
Copy link

lock bot commented Feb 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Feb 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
💾 v4.x (Legacy) Legacy version 4 support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants