Skip to content

Commit

Permalink
Add a bug to the todos for missing drawable
Browse files Browse the repository at this point in the history
  • Loading branch information
fsih authored Oct 1, 2019
1 parent 96aa930 commit 8e836a7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/RenderWebGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableSkinId (drawableID, skinId) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.skin = this._allSkins[skinId];
}
Expand All @@ -1332,7 +1332,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableRotationCenter (drawableID, rotationCenter) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.skin.setRotationCenter(rotationCenter[0], rotationCenter[1]);
}
Expand All @@ -1345,7 +1345,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableSkinIdRotationCenter (drawableID, skinId, rotationCenter) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.skin = this._allSkins[skinId];
drawable.skin.setRotationCenter(rotationCenter[0], rotationCenter[1]);
Expand All @@ -1358,7 +1358,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawablePosition (drawableID, position) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updatePosition(position);
}
Expand All @@ -1370,7 +1370,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableDirection (drawableID, direction) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updateDirection(direction);
}
Expand All @@ -1382,7 +1382,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableScale (drawableID, scale) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updateScale(scale);
}
Expand All @@ -1395,7 +1395,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableDirectionScale (drawableID, direction, scale) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updateDirection(direction);
drawable.updateScale(scale);
Expand All @@ -1408,7 +1408,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableVisible (drawableID, visible) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updateVisible(visible);
}
Expand All @@ -1421,7 +1421,7 @@ class RenderWebGL extends EventEmitter {
*/
updateDrawableEffect (drawableID, effectName, value) {
const drawable = this._allDrawables[drawableID];
// TODO: vm's requests to drawableID that do not have a Drawable object.
// TODO: https://github.com/LLK/scratch-vm/issues/2288
if (!drawable) return;
drawable.updateEffect(effectName, value);
}
Expand All @@ -1436,7 +1436,7 @@ class RenderWebGL extends EventEmitter {
const drawable = this._allDrawables[drawableID];
if (!drawable) {
/**
* @todo fix whatever's wrong in the VM which causes this, then add a warning or throw here.
* @todo(https://github.com/LLK/scratch-vm/issues/2288) fix whatever's wrong in the VM which causes this, then add a warning or throw here.
* Right now this happens so much on some projects that a warning or exception here can hang the browser.
*/
return;
Expand All @@ -1462,7 +1462,7 @@ class RenderWebGL extends EventEmitter {

const drawable = this._allDrawables[drawableID];
if (!drawable) {
// TODO: fix whatever's wrong in the VM which causes this, then add a warning or throw here.
// @todo(https://github.com/LLK/scratch-vm/issues/2288) fix whatever's wrong in the VM which causes this, then add a warning or throw here.
// Right now this happens so much on some projects that a warning or exception here can hang the browser.
return [x, y];
}
Expand Down

0 comments on commit 8e836a7

Please sign in to comment.