-
Notifications
You must be signed in to change notification settings - Fork 11
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
Scissors do not disable after most additional touch event #201
Comments
I'm not seeing this issue when using a mouse, so perhaps it doesn't need to be done for the next study version. |
Testing on iPad3, I saw that multiple vertices plus a circuit could be selected simultaneously even on the DC sim (problem is not specific to Black Box). Proposed fix is in the preceding 2 commits, and published a dev version here for testing: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.23/circuit-construction-kit-dc_en.html @phet-steele can you take a look? |
At the time of finding, DC didn't exist 😄! I checked both dev.23 and dev.29 (latest). The multiple scissors problem is fixed, but I would imagine that touching anything other than a scissor would dismiss the visible scissor? (it doesn't). For example, with a mouse I can click a vertex for a scissor, then click away and dismiss the scissor (sort of like modal behaviour). Same with a click & drag. |
It would be easy to add a listener to the background. Not sure how to add a listener to "anywhere else". I'll ask around. |
Oh wait there is already code that is supposed to be doing this: vertex.selectedProperty.set( true );
// When the user clicks on anything else, deselect the vertex
var deselect = function() {
vertex.selectedProperty.set( false );
event.pointer.removeInputListener( listener ); // Thanks, hoisting!
};
var listener = {
mouseup: deselect,
touchup: deselect
};
event.pointer.addInputListener( listener ); |
Testing http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.29/circuit-construction-kit-dc_en.html I see that if I drag out a battery, then click a vertex it becomes selected and the scissors show. Then if I click in the background, the selected vertex becomes unhighlighted and the scissor button disappears. Is this the desired behavior? Are you seeing something else? |
I would imagine this is desired (it's desired in my book!) which is why I mentioned that it wasn't happening with touch. @arouinfar? |
Sorry, I wasn't testing on touch. I'll take a closer look. |
New version is published here: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-dc/1.0.0-dev.38/circuit-construction-kit-dc_en.html I'll test the built version on iPad before sending it back to @phet-steele |
[5/24/17, 4:16:48 PM] Steele Dalton: needs to disable after a drag too, even if the drag is on a vertex that has scissors already |
In the previous commit, the vertex deselects after drag. |
Dev version posted here for testing: @phet-steele can you take a look? Note that the "deselect circuit element after dragging" is now a separate issue #333 |
Love it! |
You can have as many scissors up as desired by just touching vertices consecutively. Touching an empty area will clear all the scissors. This causes an error when done in the following manner:
Beginning of this video just demonstrates the endless scissors.
Seen on iOS 9.3.3 and Win 10 Chrome (with a touch screen). For phetsims/tasks/issues/668.
Troubleshooting information:
Name: Circuit Construction Kit: Black Box Study
URL: http://www.colorado.edu/physics/phet/dev/html/circuit-construction-kit-black-box-study/1.0.0-dev.22/circuit-construction-kit-black-box-study_en.html
Version: 1.0.0-dev.22 2016-08-02 19:40:14 UTC
Flags: pixelRatioScaling
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36
Language: en-US
Window: 1536x739
Pixel Ratio: 2.5/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: 16 varying: 30 uniform: 1024
Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32)
Max viewport: 16384x16384
OES_texture_float: true
Dependencies JSON:
{"assert":{"sha":"7d27130a","branch":"master"},"axon":{"sha":"1fd91832","branch":"master"},"babel":{"sha":"98628f5a","branch":"master"},"brand":{"sha":"f0b1f7da","branch":"master"},"chipper":{"sha":"2616d1cf","branch":"master"},"circuit-construction-kit-black-box-study":{"sha":"2ee1d54a","branch":"master"},"circuit-construction-kit-common":{"sha":"4facd999","branch":"master"},"dot":{"sha":"6ee3c51e","branch":"master"},"joist":{"sha":"e8a38a2c","branch":"master"},"kite":{"sha":"88f0c3a0","branch":"master"},"phet-core":{"sha":"c48bf320","branch":"master"},"phetcommon":{"sha":"83ea84c8","branch":"master"},"scenery":{"sha":"0318877f","branch":"master"},"scenery-phet":{"sha":"70dd84b7","branch":"master"},"sherpa":{"sha":"5ddfccd4","branch":"master"},"sun":{"sha":"df2905e6","branch":"master"},"tandem":{"sha":"bd7d63a1","branch":"master"}}
The text was updated successfully, but these errors were encountered: