Skip to content

Commit f413216

Browse files
committed
Don't include text bubbles in touching queries
1 parent 0529921 commit f413216

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

src/RenderWebGL.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,6 +1305,8 @@ class RenderWebGL extends EventEmitter {
13051305
const id = candidateIDs[index];
13061306
if (id !== drawableID) {
13071307
const drawable = this._allDrawables[id];
1308+
// Text bubbles aren't considered in "touching" queries
1309+
if (drawable.skin instanceof TextBubbleSkin) continue;
13081310
if (drawable.skin && drawable._visible) {
13091311
// Update the CPU position data
13101312
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)