mirror of
https://github.com/psychopy/psychojs.git
synced 2025-05-10 10:40:54 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
f688b65cd0
@ -393,7 +393,7 @@ export class Window extends PsychObject {
|
|||||||
// create a PIXI renderer and add it to the document:
|
// create a PIXI renderer and add it to the document:
|
||||||
this._renderer = PIXI.autoDetectRenderer(this._size[0], this._size[1], {
|
this._renderer = PIXI.autoDetectRenderer(this._size[0], this._size[1], {
|
||||||
backgroundColor: this.color.int,
|
backgroundColor: this.color.int,
|
||||||
resolution: window.devicePixelRatio,
|
resolution: window.devicePixelRatio
|
||||||
});
|
});
|
||||||
this._renderer.view.style.transform = 'translatez(0)';
|
this._renderer.view.style.transform = 'translatez(0)';
|
||||||
this._renderer.view.style.position = 'absolute';
|
this._renderer.view.style.position = 'absolute';
|
||||||
|
@ -557,13 +557,14 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
this._marker.pointerdown = this._marker.mousedown = this._marker.touchstart = (event) => {
|
this._marker.pointerdown = this._marker.mousedown = this._marker.touchstart = (event) => {
|
||||||
if (event.data.button === 0) {
|
if (event.data.button === 0) {
|
||||||
self._markerDragging = true;
|
self._markerDragging = true;
|
||||||
|
/* not quite right, just yet (as of May 2020)
|
||||||
// set markerPos, but not rating:
|
// set markerPos, but not rating:
|
||||||
const mouseLocalPos_px = event.data.getLocalPosition(self._pixi);
|
const mouseLocalPos_px = event.data.getLocalPosition(self._pixi);
|
||||||
const rating = self._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
const rating = self._posToRating([mouseLocalPos_px.x, mouseLocalPos_px.y]);
|
||||||
self._markerPos = self._granularise(rating);
|
self._markerPos = self._granularise(rating);
|
||||||
|
|
||||||
self._needMarkerUpdate = true;
|
self._needMarkerUpdate = true;
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -609,8 +610,11 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
|
|
||||||
// (*) slider mouse events outside of marker
|
// (*) slider mouse events outside of marker
|
||||||
// note: this only works thanks to eventCaptureRectangle
|
// note: this only works thanks to eventCaptureRectangle
|
||||||
this._pixi.pointerdown = this._pixi.mousedown = this._pixi.touchstart = (event) => {
|
/* not quite right just yet (as of May 2020)
|
||||||
if (event.data.button === 0) {
|
this._pixi.pointerdown = this._pixi.mousedown = this._pixi.touchstart = (event) =>
|
||||||
|
{
|
||||||
|
if (event.data.button === 0)
|
||||||
|
{
|
||||||
self._markerDragging = true;
|
self._markerDragging = true;
|
||||||
|
|
||||||
// set markerPos, but not rating:
|
// set markerPos, but not rating:
|
||||||
@ -625,6 +629,7 @@ export class Slider extends util.mix(VisualStim).with(ColorMixin)
|
|||||||
|
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
this._pixi.pointerup = this._pixi.mouseup = this._pixi.touchend = (event) => {
|
this._pixi.pointerup = this._pixi.mouseup = this._pixi.touchend = (event) => {
|
||||||
const mouseLocalPos_px = event.data.getLocalPosition(self._body);
|
const mouseLocalPos_px = event.data.getLocalPosition(self._body);
|
||||||
|
Loading…
Reference in New Issue
Block a user