Skip to content

Commit ef02dc8

Browse files
committed
Mark pen drawable as non-interactive
Using API added in TurboWarp/scratch-render@1ffefcf This replaces the hardcoded PenSkin exclusion in the renderer
1 parent fa82d53 commit ef02dc8

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/extensions/scratch3_pen/index.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,14 @@ class Scratch3PenBlocks {
137137
* @private
138138
*/
139139
_getPenLayerID () {
140-
if (this._penSkinId < 0 && this.runtime.renderer) {
141-
this._penSkinId = this.runtime.renderer.createPenSkin();
142-
this._penDrawableId = this.runtime.renderer.createDrawable(StageLayering.PEN_LAYER);
143-
this.runtime.renderer.updateDrawableSkinId(this._penDrawableId, this._penSkinId);
140+
const renderer = this.runtime.renderer;
141+
if (this._penSkinId < 0 && renderer) {
142+
this._penSkinId = renderer.createPenSkin();
143+
this._penDrawableId = renderer.createDrawable(StageLayering.PEN_LAYER);
144+
if (renderer.markDrawableAsNoninteractive) {
145+
renderer.markDrawableAsNoninteractive(this._penSkinId);
146+
}
147+
renderer.updateDrawableSkinId(this._penDrawableId, this._penSkinId);
144148
}
145149
return this._penSkinId;
146150
}

0 commit comments

Comments
 (0)