mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 10:40:54 +00:00
Merge pull request #518 from lightest/CU-33t4jt0_slider_not_working_online
Added proper if statement for blocking non 0 mouse buttons;
This commit is contained in:
commit
b5e4ce96d3
@ -854,15 +854,17 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin, WindowMixin)
|
||||
* @private
|
||||
*/
|
||||
_handlePointerDown (e) {
|
||||
if (e.data.button === 0)
|
||||
if (e.data.pointerType === "mouse" && e.data.button !== 0)
|
||||
{
|
||||
this._markerDragging = true;
|
||||
if (!this._frozenMarker)
|
||||
{
|
||||
const mouseLocalPos_px = e.data.getLocalPosition(this._pixi);
|
||||
const rating = this._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
||||
this.setMarkerPos(rating);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
this._markerDragging = true;
|
||||
if (!this._frozenMarker)
|
||||
{
|
||||
const mouseLocalPos_px = e.data.getLocalPosition(this._pixi);
|
||||
const rating = this._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
||||
this.setMarkerPos(rating);
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
|
Loading…
Reference in New Issue
Block a user