Skip to content

Commit 9386a3a

Browse files
committed
Don't include text bubbles in touching queries
1 parent 969fd7a commit 9386a3a

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/RenderWebGL.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1293,6 +1293,8 @@ class RenderWebGL extends EventEmitter {
12931293
const id = candidateIDs[index];
12941294
if (id !== drawableID) {
12951295
const drawable = this._allDrawables[id];
1296+
// Text bubbles aren't considered in "touching" queries
1297+
if (drawable.skin instanceof TextBubbleSkin) continue;
12961298
if (drawable.skin && drawable._visible) {
12971299
// Update the CPU position data
12981300
drawable.updateMatrix();

src/TextBubbleSkin.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ class TextBubbleSkin extends Skin {
241241
this._renderedScale = scale;
242242
}
243243

244+
updateSilhouette (scale = [100, 100]) {
245+
// Ensure a silhouette exists.
246+
this.getTexture(scale);
247+
}
248+
244249
/**
245250
* @param {Array<number>} scale - The scaling factors to be used, each in the [0,100] range.
246251
* @return {WebGLTexture} The GL texture representation of this skin when drawing at the given scale.

0 commit comments

Comments
 (0)