Merge pull request #654 from adroitwhiz/no-touching-bubbles
Don't include text bubbles in touching queries
This commit is contained in:
@@ -1405,6 +1405,8 @@ class RenderWebGL extends EventEmitter {
|
|||||||
const id = candidateIDs[index];
|
const id = candidateIDs[index];
|
||||||
if (id !== drawableID) {
|
if (id !== drawableID) {
|
||||||
const drawable = this._allDrawables[id];
|
const drawable = this._allDrawables[id];
|
||||||
|
// Text bubbles aren't considered in "touching" queries
|
||||||
|
if (drawable.skin instanceof TextBubbleSkin) continue;
|
||||||
if (drawable.skin && drawable._visible) {
|
if (drawable.skin && drawable._visible) {
|
||||||
// Update the CPU position data
|
// Update the CPU position data
|
||||||
drawable.updateCPURenderAttributes();
|
drawable.updateCPURenderAttributes();
|
||||||
|
|||||||
@@ -241,6 +241,11 @@ class TextBubbleSkin extends Skin {
|
|||||||
this._renderedScale = scale;
|
this._renderedScale = scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateSilhouette (scale = [100, 100]) {
|
||||||
|
// Ensure a silhouette exists.
|
||||||
|
this.getTexture(scale);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Array<number>} scale - The scaling factors to be used, each in the [0,100] range.
|
* @param {Array<number>} scale - The scaling factors to be used, each in the [0,100] range.
|
||||||
* @return {WebGLTexture} The GL texture representation of this skin when drawing at the given scale.
|
* @return {WebGLTexture} The GL texture representation of this skin when drawing at the given scale.
|
||||||
|
|||||||
Reference in New Issue
Block a user