Skip to content

Commit 00661a4

Browse files
committed
Update return value of pick() when miss to match comment
Comment says ID_NONE is returned for miss, but code actually returns false. Meanwhile GUI and scaffolding are expected null. Let's standardize on what the comment says and update GUI etc. to match.
1 parent 018610b commit 00661a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/RenderWebGL.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ class RenderWebGL extends EventEmitter {
13651365
pick (centerX, centerY, touchWidth, touchHeight, candidateIDs) {
13661366
const bounds = this.clientSpaceToScratchBounds(centerX, centerY, touchWidth, touchHeight);
13671367
if (bounds.left === -Infinity || bounds.bottom === -Infinity) {
1368-
return false;
1368+
return RenderConstants.ID_NONE;
13691369
}
13701370

13711371
candidateIDs = (candidateIDs || this._drawList).filter(id => {
@@ -1383,7 +1383,7 @@ class RenderWebGL extends EventEmitter {
13831383
return false;
13841384
});
13851385
if (candidateIDs.length === 0) {
1386-
return false;
1386+
return RenderConstants.ID_NONE;
13871387
}
13881388

13891389
const hits = [];

0 commit comments

Comments
 (0)