diff --git a/modules/extensions/src/brushing/brushing.ts b/modules/extensions/src/brushing/brushing.ts index e429cbc2345..2e8ce384527 100644 --- a/modules/extensions/src/brushing/brushing.ts +++ b/modules/extensions/src/brushing/brushing.ts @@ -70,11 +70,6 @@ export default class BrushingExtension extends LayerExtension { brushingTargets: { size: 2, accessor: 'getBrushingTarget', - // Hack: extension's defaultProps is not merged with the layer's defaultProps, - // So we can't use the standard accessor when the prop is undefined - // TODO - move to an option - // eslint-disable-next-line @typescript-eslint/unbound-method - update: this.props.getBrushingTarget ? undefined : extension.useConstantTargetPositions, shaderAttributes: { brushingTargets: { divisor: 0 @@ -111,10 +106,4 @@ export default class BrushingExtension extends LayerExtension { }); } } - - useConstantTargetPositions(attribute) { - attribute.constant = true; - attribute.value = new Float32Array(2); - return; - } } diff --git a/modules/extensions/src/clip/clip.ts b/modules/extensions/src/clip/clip.ts index a06823f2a0e..3106341f1da 100644 --- a/modules/extensions/src/clip/clip.ts +++ b/modules/extensions/src/clip/clip.ts @@ -125,8 +125,8 @@ export default class ClipExtension extends LayerExtension { } /* eslint-disable camelcase */ - draw(this: Layer, {uniforms}: any): void { - const {clipBounds = defaultProps.clipBounds} = this.props; + draw(this: Layer>, {uniforms}: any): void { + const {clipBounds} = this.props; if (this.state.clipByInstance) { uniforms.clip_bounds = clipBounds; } else { diff --git a/modules/extensions/src/mask/mask.ts b/modules/extensions/src/mask/mask.ts index 4b93f3ae3b9..efe86376833 100644 --- a/modules/extensions/src/mask/mask.ts +++ b/modules/extensions/src/mask/mask.ts @@ -51,9 +51,9 @@ export default class MaskExtension extends LayerExtension { } /* eslint-disable camelcase */ - draw(this: Layer, {uniforms, context, moduleParameters}: any) { + draw(this: Layer>, {uniforms, context, moduleParameters}: any) { uniforms.mask_maskByInstance = this.state.maskByInstance; - const {maskId = '', maskInverted = false} = this.props; + const {maskId, maskInverted} = this.props; const {maskChannels} = moduleParameters; const {viewport} = context; if (maskChannels && maskChannels[maskId]) {