Closed Matthew-Moore240 closed 3 years ago
This is for https://github.com/phetsims/QA/issues/642
Discussed briefly with @jonathanolson on Slack.
When a drag ends, the dragged object is supposed to animate to either a scale plate, or back to the toolbox where it originated. It looks like the sim is not getting the message that the drag has ended, and that animation is not running. That results in the object remaining where it was when the drag ended.
I would expect a similar problem in Function Builder, or any sim where objects move via animation when a drag ends. But I don't see a similar GitHub issue created for Function Builder.
@jonathanolson is going to investigate this. Let me know if you need help.
This is present in master, likely interrupt()
is not implemented on the input listener being used here.
See TermDragListener.js. Definitely not implementing interrupt()
, because there was previously nothing in the sim that required it. The recent changes to iframe interrupting apparently changes that. Can this be resolved by adding this?
interrupt: ( event, trail ) => self.end( event, trail )
We want the same behavior as end
; that is, the objects return to the scale or toolbox.
It's actually implementing interrupt through SimpleDragHandler. However it's explicitly doing nothing in the interrupt case:
https://github.com/phetsims/equality-explorer/blob/master/js/common/view/TermDragListener.js#L214
Does it make sense to remove that line for the sim?
Ah, I see. Try removing that line and see if it fixes the problem? Let me know if you'd like me to investigate.
Oh wait.... I don't understand this:
It's actually implementing interrupt through SimpleDragHandler.
I don't see SimpleDragHandler used in this sim. It was converted to DragListener awhile back.
Also wondering how you're testing this. I don't see an option in phetmarks to run a sim in an iframe.
@jonathanolson and I worked on this. I fixed in master (above commit). @jonathanolson will maintenance release for the 3 sims in this family.
Patched up on the 3 relevant sims, unassigning
Closing, handled in maintenance release deployment.
Test device Win 10 Chrome Operating System Win 10 Browser Chrome Problem description The animals and other objects stick to the walls or bottom of the sim
Note from @KatieWoe it impacts the whole family of sims
Steps to reproduce On any of the screens besides the "solve it" screen just drag the movable objects into the walls Visuals
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: Equality Explorer URL: https://phet-dev.colorado.edu/html/equality-explorer/1.0.13-rc.2/phet/equality-explorer_en_phet.html Version: 1.0.13-rc.2 2021-04-23 18:42:48 UTC Features missing: applicationcache, generatedcontent, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36 Language: en-US Window: 2048x1042 Pixel Ratio: 1.25/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 32 varying: 32 uniform: 256 Texture: size: 8192 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 8192x8192 OES_texture_float: true Dependencies JSON: {"assert":{"sha":"928741cf","branch":"HEAD"},"axon":{"sha":"bbf84cf1","branch":"HEAD"},"brand":{"sha":"aeeae989","branch":"HEAD"},"chipper":{"sha":"2ac76ec8","branch":"HEAD"},"dot":{"sha":"383e4b02","branch":"HEAD"},"equality-explorer":{"sha":"170f7917","branch":"HEAD"},"joist":{"sha":"0fb36122","branch":"HEAD"},"kite":{"sha":"d08fb3c7","branch":"HEAD"},"phet-core":{"sha":"466d557a","branch":"HEAD"},"phet-io":{"sha":"2a3c3457","branch":"HEAD"},"phet-io-wrappers":{"sha":"d90097d8","branch":"HEAD"},"phetcommon":{"sha":"1a71e128","branch":"HEAD"},"phetmarks":{"sha":"3091ec1d","branch":"HEAD"},"query-string-machine":{"sha":"e5007cda","branch":"HEAD"},"scenery":{"sha":"36e31e4f","branch":"HEAD"},"scenery-phet":{"sha":"c2ceadad","branch":"HEAD"},"sherpa":{"sha":"341552b7","branch":"HEAD"},"sun":{"sha":"9b94b548","branch":"HEAD"},"tandem":{"sha":"7fd76b92","branch":"HEAD"},"twixt":{"sha":"ca04b21f","branch":"HEAD"},"vegas":{"sha":"213b6a79","branch":"HEAD"},"vibe":{"sha":"5e79be95","branch":"HEAD"}}