Mercurial > hg > orthanc-stone
comparison Framework/Scene2DViewport/OneGesturePointerTracker.cpp @ 1218:6f3f1ef347a3 broker
fix OneGesturePointerTracker if mouse release is outside the canvas
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Dec 2019 17:05:57 +0100 |
parents | e42b491f1fb2 |
children | 0ca50d275b9a |
comparison
equal
deleted
inserted
replaced
1217:c04d0aa40f73 | 1218:6f3f1ef347a3 |
---|---|
53 { | 53 { |
54 // additional touches are not taken into account but we need to count | 54 // additional touches are not taken into account but we need to count |
55 // the number of active touches | 55 // the number of active touches |
56 currentTouchCount_++; | 56 currentTouchCount_++; |
57 LOG(INFO) << "currentTouchCount_ becomes: " << currentTouchCount_; | 57 LOG(INFO) << "currentTouchCount_ becomes: " << currentTouchCount_; |
58 | |
59 /** | |
60 * 2019-12-06 (SJO): Patch to have consistent behavior when mouse | |
61 * leaves the canvas while the tracker is still active, then | |
62 * button is released while out-of-canvas. Such an event is not | |
63 * catched (at least in WebAssembly), so we delete the tracker on | |
64 * the next click inside the canvas. | |
65 **/ | |
66 alive_ = false; | |
58 } | 67 } |
59 | 68 |
60 bool OneGesturePointerTracker::IsAlive() const | 69 bool OneGesturePointerTracker::IsAlive() const |
61 { | 70 { |
62 return alive_; | 71 return alive_; |