Canvas: fix distance check for click events.
This commit is contained in:
parent
b0d6ed3844
commit
36d1308aa6
@ -279,8 +279,8 @@ namespace canvas
|
|||||||
const EventPropagationPath& path2 ) const
|
const EventPropagationPath& path2 ) const
|
||||||
{
|
{
|
||||||
osg::Vec2 delta = path1.front().local_pos - path2.front().local_pos;
|
osg::Vec2 delta = path1.front().local_pos - path2.front().local_pos;
|
||||||
return delta.x() < drag_threshold
|
return std::fabs(delta.x()) < drag_threshold
|
||||||
&& delta.y() < drag_threshold;
|
&& std::fabs(delta.y()) < drag_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user