1
0
mirror of https://github.com/psychopy/psychojs.git synced 2025-05-10 10:40:54 +00:00

Merge branch 'master' of github.com:psychopy/psychojs

This commit is contained in:
Alain Pitiot 2019-04-19 09:50:37 +02:00
commit 982033a1b9
2 changed files with 20 additions and 4 deletions

View File

@ -14,7 +14,7 @@
*
* <p>
* Tasks are either another [Scheduler]{@link module:util.Scheduler}, or a
* JavaScript functions returning one of the following codes:
* JavaScript function returning one of the following codes:
* <ul>
* <li>Scheduler.Event.NEXT: Move onto the next task *without* rendering the scene first.</li>
* <li>Scheduler.Event.FLIP_REPEAT: Render the scene and repeat the task.</li>
@ -287,4 +287,4 @@ Scheduler.Status = {
* The Scheduler is stopped.
*/
STOPPED: Symbol.for('STOPPED')
};
};

View File

@ -76,7 +76,7 @@ export class Rect extends ShapeStim {
* @name module:visual.Rect#setWidth
* @public
* @param {number} width - the rectange width
* @param {boolean} [log= false] - whether of not to log
* @param {boolean} [log= false] - whether or not to log
*/
setWidth(width, log = false) {
this._psychoJS.logger.debug('set the width of Rect: ', this.name, 'to: ', width);
@ -92,7 +92,7 @@ export class Rect extends ShapeStim {
* @name module:visual.Rect#setHeight
* @public
* @param {number} height - the rectange height
* @param {boolean} [log= false] - whether of not to log
* @param {boolean} [log= false] - whether or not to log
*/
setHeight(height, log = false) {
this._psychoJS.logger.debug('set the height of Rect: ', this.name, 'to: ', height);
@ -101,7 +101,23 @@ export class Rect extends ShapeStim {
this._updateVertices();
}
/**
* Setter for the size attribute.
*
* @name module:visual.Rect#setSize
* @public
* @param {number[]} size - the [x, y] size of the rectangle
* @param {boolean} [log= false] - whether or not to log
*/
setSize(size, log = false) {
this._psychoJS.logger.debug('set the size of Rect: ', this.name, 'to: ', size);
this._setAttribute('width', size[0], log);
this._setAttribute('height', size[1], log);
}
/**
* Update the base shape vertices.
*