@visactor/vrender-core 0.16.18 → 0.16.19-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4300,7 +4300,10 @@
4300
4300
  lineClamp: Infinity,
4301
4301
  suffixPosition: 'end'
4302
4302
  };
4303
- const DefaultStyle = Object.assign(Object.assign(Object.assign({ opacity: 1, background: null, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', blur: 0, cursor: null, html: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout);
4303
+ const DefaultPickStyle = {
4304
+ pickStrokeBuffer: 0
4305
+ };
4306
+ const DefaultStyle = Object.assign(Object.assign(Object.assign(Object.assign({ opacity: 1, background: null, texture: null, textureColor: 'black', textureSize: 10, texturePadding: 2, backgroundMode: 'no-repeat', blur: 0, cursor: null, html: null }, DefaultFillStyle), DefaultStrokeStyle), DefaultLayout), DefaultPickStyle);
4304
4307
  const DefaultConnectAttribute = {
4305
4308
  connectedType: 'none',
4306
4309
  connectedStyle: {},
@@ -19366,19 +19369,20 @@
19366
19369
  }
19367
19370
  }
19368
19371
  transformAABBBounds(attribute, aabbBounds, theme, miter, graphic) {
19369
- const { scaleX = theme.scaleX, scaleY = theme.scaleY, stroke = theme.stroke, shadowBlur = theme.shadowBlur, lineWidth = theme.lineWidth, strokeBoundsBuffer = theme.strokeBoundsBuffer } = attribute;
19372
+ const { scaleX = theme.scaleX, scaleY = theme.scaleY, stroke = theme.stroke, shadowBlur = theme.shadowBlur, lineWidth = theme.lineWidth, pickStrokeBuffer = theme.pickStrokeBuffer, strokeBoundsBuffer = theme.strokeBoundsBuffer } = attribute;
19370
19373
  const tb1 = this.tempAABBBounds1;
19371
19374
  const tb2 = this.tempAABBBounds2;
19372
19375
  if (stroke) {
19373
- const scaledHalfLineWidth = lineWidth / Math.abs(scaleX + scaleY);
19376
+ const scaledHalfLineWidth = (lineWidth + pickStrokeBuffer) / Math.abs(scaleX + scaleY);
19374
19377
  boundStroke(tb1, scaledHalfLineWidth, miter, strokeBoundsBuffer);
19375
19378
  aabbBounds.union(tb1);
19376
19379
  tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
19377
19380
  }
19378
19381
  if (shadowBlur) {
19379
19382
  const { shadowOffsetX = theme.shadowOffsetX, shadowOffsetY = theme.shadowOffsetY } = attribute;
19380
- const shadowBlurWidth = (shadowBlur / Math.abs(scaleX + scaleY)) * 2 + Math.max(shadowOffsetX, shadowOffsetY);
19381
- boundStroke(tb1, shadowBlurWidth, miter, strokeBoundsBuffer + 1);
19383
+ const shadowBlurWidth = (shadowBlur / Math.abs(scaleX + scaleY)) * 2;
19384
+ boundStroke(tb1, shadowBlurWidth, false, strokeBoundsBuffer + 1);
19385
+ tb1.translate(shadowOffsetX, shadowOffsetY);
19382
19386
  aabbBounds.union(tb1);
19383
19387
  }
19384
19388
  this.combindShadowAABBBounds(aabbBounds, graphic);
@@ -27889,6 +27893,7 @@
27889
27893
  exports.DefaultMatrixAllocate = DefaultMatrixAllocate;
27890
27894
  exports.DefaultMorphingAnimateConfig = DefaultMorphingAnimateConfig;
27891
27895
  exports.DefaultPathAttribute = DefaultPathAttribute;
27896
+ exports.DefaultPickStyle = DefaultPickStyle;
27892
27897
  exports.DefaultPolygonAttribute = DefaultPolygonAttribute;
27893
27898
  exports.DefaultRect3dAttribute = DefaultRect3dAttribute;
27894
27899
  exports.DefaultRectAttribute = DefaultRectAttribute;