mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 18:50:54 +00:00
added proper if statement for blocking non 0 mousebuttons;
This commit is contained in:
parent
fa731254bc
commit
0f60204721
@ -854,8 +854,11 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_handlePointerDown (e) {
|
_handlePointerDown (e) {
|
||||||
if (e.data.button === 0)
|
if (e.data.pointerType === "mouse" && e.data.button !== 0)
|
||||||
{
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this._markerDragging = true;
|
this._markerDragging = true;
|
||||||
if (!this._frozenMarker)
|
if (!this._frozenMarker)
|
||||||
{
|
{
|
||||||
@ -863,7 +866,6 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
|||||||
const rating = this._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
const rating = this._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
||||||
this.setMarkerPos(rating);
|
this.setMarkerPos(rating);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user