Closed jrainville closed 7 years ago
Code for mouse is good. For touch, React only supports touchStart
, touchMove
, touchEnd
and touchCancel
. Therefore, to support touch, a function
on touchMove
must check if the element under the cursor is neither the menu circle nor the element of which the currentAction
props is set, i.e., if the action in this.props.application.workspace.currentAction
is not equal to the element under the touch.
I fixed it @franck36 . Since it is impossible to detect the leave on touch (I tried putting a onTouchMove
on the <g>
, but the area covert by it is not a square but the quarter of a circle, I cannot really detect the leave easily), I put the closure of the menu when ist is touch on entering the action.
Est-ce qu'un gentil monsieur peut faire le review syouplè? :gun:
Je peux review mais je peux pas tester
On Sun, Apr 2, 2017, 11:50 Jonathan Rainville notifications@github.com wrote:
Est-ce qu'un gentil monsieur peut faire le review syouplè? 🔫
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JForsaken/protosketcher-frontend/pull/121#issuecomment-290994940, or mute the thread https://github.com/notifications/unsubscribe-auth/AG0EO3g4Cvh2uCNHh7Cp5wg1-GuRLNvpks5rr8PbgaJpZM4MugNF .
-- François Lauzier
Le code est good. Je vais tester sur tablette quand sa sera mergé et que je serai chez nous (demain).
https://github.com/JForsaken/protosketcher-frontend/issues/54 Hides the menu when some actions are selected. The actions hiding are:
select
move
copy move Others don't hide because it would have been silly and/or fristrating (eg: delete)
Not sure it works on mobile, since
onTouchLeave
doesn't exist, but maybeonMouseLeave
works too.