Skip to content

Commit ba30bc1

Browse files
committed
fix: fix missing extraCommandProps when shadow includes changed in FillPainter
1 parent 181f128 commit ba30bc1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/vt/src/layer/plugins/painters/FillPainter.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,8 @@ class FillPainter extends BasicPainter {
498498
paint(context) {
499499
if (this.isShadowIncludeChanged(context)) {
500500
this.shader.dispose();
501-
this._createShader(context);
501+
const extraCommandProps = this._getExtraCommandProps();
502+
this._createShader(context, extraCommandProps);
502503
}
503504
super.paint(context);
504505
}
@@ -514,7 +515,7 @@ class FillPainter extends BasicPainter {
514515
return isEnableStencil && (isVectorTile || isTileLayer && this.isOnly2D());
515516
}
516517

517-
init(context) {
518+
_getExtraCommandProps() {
518519
const regl = this.regl;
519520
const canvas = this.canvas;
520521
const viewport = {
@@ -593,6 +594,11 @@ class FillPainter extends BasicPainter {
593594
offset: this.getPolygonOffset()
594595
}
595596
};
597+
return extraCommandProps;
598+
}
599+
600+
init(context) {
601+
const extraCommandProps = this._getExtraCommandProps();
596602
this._createShader(context, extraCommandProps);
597603

598604
if (this.pickingFBO) {

0 commit comments

Comments
 (0)