@visactor/vrender 0.19.8-beta.4 → 0.19.9-beta.1
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +119 -132
- package/dist/index.js +120 -131
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -7224,22 +7224,18 @@
|
|
|
7224
7224
|
this[type] = line, line.pathProxy = new CustomPath2D(), root.add(line);
|
|
7225
7225
|
}
|
|
7226
7226
|
onStartRect() {
|
|
7227
|
-
var _a
|
|
7227
|
+
var _a;
|
|
7228
7228
|
const root = this.target.attachShadow(),
|
|
7229
|
-
|
|
7230
|
-
sizeAttr = isHorizontal ? "height" : "width",
|
|
7231
|
-
otherSizeAttr = isHorizontal ? "width" : "height",
|
|
7232
|
-
size = this.target.AABBBounds[sizeAttr](),
|
|
7233
|
-
y = isHorizontal ? 0 : this.target.AABBBounds.y1,
|
|
7229
|
+
height = this.target.AABBBounds.height(),
|
|
7234
7230
|
rect = application.graphicService.creator.rect(Object.assign(Object.assign({
|
|
7235
|
-
|
|
7231
|
+
height: height,
|
|
7236
7232
|
fill: "#bcdeff",
|
|
7237
7233
|
shadowBlur: 30,
|
|
7238
7234
|
shadowColor: "#bcdeff"
|
|
7239
|
-
}, null === (
|
|
7235
|
+
}, null === (_a = this.params) || void 0 === _a ? void 0 : _a.attribute), {
|
|
7240
7236
|
x: 0,
|
|
7241
|
-
y:
|
|
7242
|
-
|
|
7237
|
+
y: 0,
|
|
7238
|
+
width: 0
|
|
7243
7239
|
}));
|
|
7244
7240
|
this.rect = rect, root.add(rect);
|
|
7245
7241
|
}
|
|
@@ -7251,49 +7247,25 @@
|
|
|
7251
7247
|
return this.rect ? this.onUpdateRect(end, ratio, out) : this.line || this.area ? this.onUpdateLineOrArea(end, ratio, out) : void 0;
|
|
7252
7248
|
}
|
|
7253
7249
|
onUpdateRect(end, ratio, out) {
|
|
7254
|
-
var _a, _b, _c, _d, _e, _f
|
|
7255
|
-
const
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7259
|
-
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7264
|
-
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7269
|
-
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
ratio: ratio,
|
|
7274
|
-
end: end
|
|
7275
|
-
}
|
|
7276
|
-
});
|
|
7277
|
-
} else {
|
|
7278
|
-
const parentHeight = null !== (_l = null !== (_k = parentAttr.height) && void 0 !== _k ? _k : Math.abs(parentAttr.y1 - parentAttr.y)) && void 0 !== _l ? _l : 250,
|
|
7279
|
-
streamLength = null !== (_o = null === (_m = this.params) || void 0 === _m ? void 0 : _m.streamLength) && void 0 !== _o ? _o : parentHeight,
|
|
7280
|
-
maxLength = null !== (_r = null === (_q = null === (_p = this.params) || void 0 === _p ? void 0 : _p.attribute) || void 0 === _q ? void 0 : _q.height) && void 0 !== _r ? _r : 60,
|
|
7281
|
-
currentY = parentHeight - (streamLength + maxLength) * ratio;
|
|
7282
|
-
let y = Math.min(currentY, parentHeight);
|
|
7283
|
-
const h = Math.min(parentHeight - currentY, maxLength);
|
|
7284
|
-
let height;
|
|
7285
|
-
y <= 0 ? (height = Math.max(y + h, 0), y = 0) : height = h, this.rect.setAttributes({
|
|
7286
|
-
y: y,
|
|
7287
|
-
height: height,
|
|
7288
|
-
dy: Math.min(parentAttr.y1 - parentAttr.y, 0)
|
|
7289
|
-
}, !1, {
|
|
7290
|
-
type: exports.AttributeUpdateType.ANIMATE_PLAY,
|
|
7291
|
-
animationState: {
|
|
7292
|
-
ratio: ratio,
|
|
7293
|
-
end: end
|
|
7294
|
-
}
|
|
7295
|
-
});
|
|
7296
|
-
}
|
|
7250
|
+
var _a, _b, _c, _d, _e, _f;
|
|
7251
|
+
const parentWidth = null !== (_a = this.target.attribute.width) && void 0 !== _a ? _a : 250,
|
|
7252
|
+
streamLength = null !== (_c = null === (_b = this.params) || void 0 === _b ? void 0 : _b.streamLength) && void 0 !== _c ? _c : parentWidth,
|
|
7253
|
+
maxLength = null !== (_f = null === (_e = null === (_d = this.params) || void 0 === _d ? void 0 : _d.attribute) || void 0 === _e ? void 0 : _e.width) && void 0 !== _f ? _f : 60,
|
|
7254
|
+
startX = -maxLength,
|
|
7255
|
+
currentX = startX + (streamLength - startX) * ratio,
|
|
7256
|
+
x = Math.max(currentX, 0),
|
|
7257
|
+
w = Math.min(Math.min(currentX + maxLength, maxLength), streamLength - currentX),
|
|
7258
|
+
width = w + x > parentWidth ? Math.max(parentWidth - x, 0) : w;
|
|
7259
|
+
this.rect.setAttributes({
|
|
7260
|
+
x: x,
|
|
7261
|
+
width: width
|
|
7262
|
+
}, !1, {
|
|
7263
|
+
type: exports.AttributeUpdateType.ANIMATE_PLAY,
|
|
7264
|
+
animationState: {
|
|
7265
|
+
ratio: ratio,
|
|
7266
|
+
end: end
|
|
7267
|
+
}
|
|
7268
|
+
});
|
|
7297
7269
|
}
|
|
7298
7270
|
onUpdateLineOrArea(end, ratio, out) {
|
|
7299
7271
|
const target = this.line || this.area;
|
|
@@ -12291,6 +12263,7 @@
|
|
|
12291
12263
|
var _a;
|
|
12292
12264
|
if (!states.length) return void this.clearStates(hasAnimation);
|
|
12293
12265
|
if (!((null === (_a = this.currentStates) || void 0 === _a ? void 0 : _a.length) !== states.length || states.some((stateName, index) => this.currentStates[index] !== stateName))) return;
|
|
12266
|
+
this.stopStateAnimates();
|
|
12294
12267
|
const stateAttrs = {},
|
|
12295
12268
|
subAttrs = this.subGraphic.map(() => ({}));
|
|
12296
12269
|
states.forEach(stateName => {
|
|
@@ -12304,9 +12277,9 @@
|
|
|
12304
12277
|
}), this.updateNormalAttrs(stateAttrs), this.currentStates = states, this.applyStateAttrs(stateAttrs, states, hasAnimation);
|
|
12305
12278
|
}
|
|
12306
12279
|
clearStates(hasAnimation) {
|
|
12307
|
-
this.hasState() && this.normalAttrs
|
|
12280
|
+
this.stopStateAnimates(), this.hasState() && this.normalAttrs ? (this.currentStates = [], this.subGraphic.forEach(graphic => {
|
|
12308
12281
|
graphic.applyStateAttrs(graphic.normalAttrs, this.currentStates, hasAnimation, !0), graphic.normalAttrs = null;
|
|
12309
|
-
}), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)
|
|
12282
|
+
}), this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
12310
12283
|
}
|
|
12311
12284
|
clone() {
|
|
12312
12285
|
const glyph = new Glyph(Object.assign({}, this.attribute));
|
|
@@ -13878,7 +13851,7 @@
|
|
|
13878
13851
|
onClearIncremental: new SyncHook(["graphic", "group", "stage"]),
|
|
13879
13852
|
beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
|
|
13880
13853
|
afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"])
|
|
13881
|
-
}, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds(), this._rectBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._symbolBoundsContribitions = [new DefaultSymbolOuterBorderBoundsContribution()], this._circleBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._arcBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._pathBoundsContribitions = [new DefaultOuterBorderBoundsContribution()];
|
|
13854
|
+
}, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds(), this._rectBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._symbolBoundsContribitions = [new DefaultSymbolOuterBorderBoundsContribution()], this._imageBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._circleBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._arcBoundsContribitions = [new DefaultOuterBorderBoundsContribution()], this._pathBoundsContribitions = [new DefaultOuterBorderBoundsContribution()];
|
|
13882
13855
|
}
|
|
13883
13856
|
onAttributeUpdate(graphic) {
|
|
13884
13857
|
this.hooks.onAttributeUpdate.taps.length && this.hooks.onAttributeUpdate.call(graphic);
|
|
@@ -14279,7 +14252,9 @@
|
|
|
14279
14252
|
}
|
|
14280
14253
|
const tb1 = this.tempAABBBounds1,
|
|
14281
14254
|
tb2 = this.tempAABBBounds2;
|
|
14282
|
-
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this.
|
|
14255
|
+
return tb1.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), tb2.setValue(aabbBounds.x1, aabbBounds.y1, aabbBounds.x2, aabbBounds.y2), this._imageBoundsContribitions.length && this._imageBoundsContribitions.forEach(c => {
|
|
14256
|
+
c.updateBounds(attribute, imageTheme, tb1, graphic), aabbBounds.union(tb1), tb1.setValue(tb2.x1, tb2.y1, tb2.x2, tb2.y2);
|
|
14257
|
+
}), this.transformAABBBounds(attribute, aabbBounds, imageTheme, !1, graphic), aabbBounds;
|
|
14283
14258
|
}
|
|
14284
14259
|
combindShadowAABBBounds(bounds, graphic) {
|
|
14285
14260
|
if (graphic && graphic.shadowRoot) {
|
|
@@ -15210,70 +15185,6 @@
|
|
|
15210
15185
|
return path.closePath(), path;
|
|
15211
15186
|
}
|
|
15212
15187
|
|
|
15213
|
-
class DefaultImageBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
|
|
15214
|
-
constructor() {
|
|
15215
|
-
super(...arguments), this.time = exports.BaseRenderContributionTime.beforeFillStroke;
|
|
15216
|
-
}
|
|
15217
|
-
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
15218
|
-
const {
|
|
15219
|
-
background: background,
|
|
15220
|
-
backgroundMode = graphicAttribute.backgroundMode,
|
|
15221
|
-
backgroundFit = graphicAttribute.backgroundFit
|
|
15222
|
-
} = graphic.attribute;
|
|
15223
|
-
if (background) if (graphic.backgroundImg) {
|
|
15224
|
-
const res = graphic.resources.get(background);
|
|
15225
|
-
if ("success" !== res.state || !res.data) return;
|
|
15226
|
-
if (context.save(), graphic.parent && !graphic.transMatrix.onlyTranslate()) {
|
|
15227
|
-
const groupAttribute = getTheme(graphic.parent).group,
|
|
15228
|
-
{
|
|
15229
|
-
scrollX = groupAttribute.scrollX,
|
|
15230
|
-
scrollY = groupAttribute.scrollY
|
|
15231
|
-
} = graphic.parent.attribute;
|
|
15232
|
-
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.translate(scrollX, scrollY);
|
|
15233
|
-
}
|
|
15234
|
-
const b = graphic.AABBBounds;
|
|
15235
|
-
this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
15236
|
-
} else if (isObject$1(background)) {
|
|
15237
|
-
const {
|
|
15238
|
-
stroke: stroke,
|
|
15239
|
-
fill: fill,
|
|
15240
|
-
lineWidth = 1,
|
|
15241
|
-
cornerRadius = 0,
|
|
15242
|
-
expandX = 0,
|
|
15243
|
-
expandY = 0
|
|
15244
|
-
} = background;
|
|
15245
|
-
if (!stroke && !fill) return;
|
|
15246
|
-
context.beginPath();
|
|
15247
|
-
const {
|
|
15248
|
-
x: x,
|
|
15249
|
-
y: y,
|
|
15250
|
-
width: width,
|
|
15251
|
-
height: height
|
|
15252
|
-
} = getActualPosition(graphic);
|
|
15253
|
-
cornerRadius ? createRectPath(context, x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
15254
|
-
} else {
|
|
15255
|
-
context.beginPath();
|
|
15256
|
-
const b = graphic.AABBBounds;
|
|
15257
|
-
context.rect(x, y, b.width(), b.height()), context.fillStyle = background, context.globalAlpha = 1, context.fill();
|
|
15258
|
-
}
|
|
15259
|
-
}
|
|
15260
|
-
}
|
|
15261
|
-
function getActualPosition(graphic) {
|
|
15262
|
-
const boundsPadding = parsePadding(graphic.attribute.boundsPadding),
|
|
15263
|
-
bounds = graphic.AABBBounds;
|
|
15264
|
-
let x = bounds.x1,
|
|
15265
|
-
y = bounds.y1,
|
|
15266
|
-
width = bounds.width(),
|
|
15267
|
-
height = bounds.height();
|
|
15268
|
-
return isNumber$1(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
|
|
15269
|
-
x: x,
|
|
15270
|
-
y: y,
|
|
15271
|
-
width: width,
|
|
15272
|
-
height: height
|
|
15273
|
-
};
|
|
15274
|
-
}
|
|
15275
|
-
const defaultImageBackgroundRenderContribution = new DefaultImageBackgroundRenderContribution();
|
|
15276
|
-
|
|
15277
15188
|
var __decorate$1D = undefined && undefined.__decorate || function (decorators, target, key, desc) {
|
|
15278
15189
|
var d,
|
|
15279
15190
|
c = arguments.length,
|
|
@@ -15380,6 +15291,79 @@
|
|
|
15380
15291
|
const defaultRectTextureRenderContribution = defaultBaseTextureRenderContribution;
|
|
15381
15292
|
const defaultRectBackgroundRenderContribution = defaultBaseBackgroundRenderContribution;
|
|
15382
15293
|
|
|
15294
|
+
class DefaultImageBackgroundRenderContribution extends DefaultBaseBackgroundRenderContribution {
|
|
15295
|
+
constructor() {
|
|
15296
|
+
super(...arguments), this.time = exports.BaseRenderContributionTime.beforeFillStroke;
|
|
15297
|
+
}
|
|
15298
|
+
drawShape(graphic, context, x, y, doFill, doStroke, fVisible, sVisible, graphicAttribute, drawContext, fillCb, strokeCb) {
|
|
15299
|
+
const {
|
|
15300
|
+
background: background,
|
|
15301
|
+
backgroundMode = graphicAttribute.backgroundMode,
|
|
15302
|
+
backgroundFit = graphicAttribute.backgroundFit
|
|
15303
|
+
} = graphic.attribute;
|
|
15304
|
+
if (background) if (graphic.backgroundImg) {
|
|
15305
|
+
const res = graphic.resources.get(background);
|
|
15306
|
+
if ("success" !== res.state || !res.data) return;
|
|
15307
|
+
if (context.save(), graphic.parent && !graphic.transMatrix.onlyTranslate()) {
|
|
15308
|
+
const groupAttribute = getTheme(graphic.parent).group,
|
|
15309
|
+
{
|
|
15310
|
+
scrollX = groupAttribute.scrollX,
|
|
15311
|
+
scrollY = groupAttribute.scrollY
|
|
15312
|
+
} = graphic.parent.attribute;
|
|
15313
|
+
context.setTransformFromMatrix(graphic.parent.globalTransMatrix, !0), context.translate(scrollX, scrollY);
|
|
15314
|
+
}
|
|
15315
|
+
const b = graphic.AABBBounds;
|
|
15316
|
+
this.doDrawImage(context, res.data, b, backgroundMode, backgroundFit), context.restore(), graphic.transMatrix.onlyTranslate() || context.setTransformForCurrent();
|
|
15317
|
+
} else if (isObject$1(background)) {
|
|
15318
|
+
const {
|
|
15319
|
+
stroke: stroke,
|
|
15320
|
+
fill: fill,
|
|
15321
|
+
lineWidth = 1,
|
|
15322
|
+
cornerRadius = 0,
|
|
15323
|
+
expandX = 0,
|
|
15324
|
+
expandY = 0
|
|
15325
|
+
} = background;
|
|
15326
|
+
if (!stroke && !fill) return;
|
|
15327
|
+
context.beginPath();
|
|
15328
|
+
const {
|
|
15329
|
+
x: x,
|
|
15330
|
+
y: y,
|
|
15331
|
+
width: width,
|
|
15332
|
+
height: height
|
|
15333
|
+
} = getActualPosition(graphic);
|
|
15334
|
+
cornerRadius ? createRectPath(context, x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY, cornerRadius) : context.rect(x - expandX, y - expandY, width + 2 * expandX, height + 2 * expandY), context.globalAlpha = 1, fill && (context.fillStyle = fill, context.fill()), stroke && lineWidth > 0 && (context.lineWidth = lineWidth, context.strokeStyle = stroke, context.stroke());
|
|
15335
|
+
} else {
|
|
15336
|
+
context.beginPath();
|
|
15337
|
+
const b = graphic.AABBBounds;
|
|
15338
|
+
context.rect(x, y, b.width(), b.height()), context.fillStyle = background, context.globalAlpha = 1, context.fill();
|
|
15339
|
+
}
|
|
15340
|
+
}
|
|
15341
|
+
}
|
|
15342
|
+
function getActualPosition(graphic) {
|
|
15343
|
+
const boundsPadding = parsePadding(graphic.attribute.boundsPadding),
|
|
15344
|
+
bounds = graphic.AABBBounds;
|
|
15345
|
+
let x = bounds.x1,
|
|
15346
|
+
y = bounds.y1,
|
|
15347
|
+
width = bounds.width(),
|
|
15348
|
+
height = bounds.height();
|
|
15349
|
+
return isNumber$1(boundsPadding) ? (x += boundsPadding, y += boundsPadding, width -= 2 * boundsPadding, height -= 2 * boundsPadding) : (x += boundsPadding[3], y += boundsPadding[0], width -= boundsPadding[1] + boundsPadding[3], height -= boundsPadding[0] + boundsPadding[2]), {
|
|
15350
|
+
x: x,
|
|
15351
|
+
y: y,
|
|
15352
|
+
width: width,
|
|
15353
|
+
height: height
|
|
15354
|
+
};
|
|
15355
|
+
}
|
|
15356
|
+
class DefaultImageRenderContribution extends DefaultRectRenderContribution {
|
|
15357
|
+
constructor() {
|
|
15358
|
+
super(...arguments), this.time = exports.BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
15359
|
+
}
|
|
15360
|
+
drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb) {
|
|
15361
|
+
return super.drawShape(rect, context, x, y, doFill, doStroke, fVisible, sVisible, rectAttribute, drawContext, fillCb, strokeCb);
|
|
15362
|
+
}
|
|
15363
|
+
}
|
|
15364
|
+
const defaultImageRenderContribution = new DefaultImageRenderContribution();
|
|
15365
|
+
const defaultImageBackgroundRenderContribution = new DefaultImageBackgroundRenderContribution();
|
|
15366
|
+
|
|
15383
15367
|
class DefaultSymbolRenderContribution {
|
|
15384
15368
|
constructor() {
|
|
15385
15369
|
this.time = exports.BaseRenderContributionTime.afterFillStroke, this.useStyle = !0, this.order = 0;
|
|
@@ -16959,15 +16943,17 @@
|
|
|
16959
16943
|
const repeatStr = ["", "repeat-x", "repeat-y", "repeat"];
|
|
16960
16944
|
exports.DefaultCanvasImageRender = class DefaultCanvasImageRender extends BaseRender {
|
|
16961
16945
|
constructor(imageRenderContribitions) {
|
|
16962
|
-
super(), this.imageRenderContribitions = imageRenderContribitions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageBackgroundRenderContribution], this.init(imageRenderContribitions);
|
|
16946
|
+
super(), this.imageRenderContribitions = imageRenderContribitions, this.numberType = IMAGE_NUMBER_TYPE, this.builtinContributions = [defaultImageRenderContribution, defaultImageBackgroundRenderContribution], this.init(imageRenderContribitions);
|
|
16963
16947
|
}
|
|
16964
|
-
drawShape(image, context, x, y, drawContext, params, fillCb) {
|
|
16948
|
+
drawShape(image, context, x, y, drawContext, params, fillCb, strokeCb) {
|
|
16965
16949
|
const imageAttribute = getTheme(image).image,
|
|
16966
16950
|
{
|
|
16967
16951
|
width = imageAttribute.width,
|
|
16968
16952
|
height = imageAttribute.height,
|
|
16969
16953
|
repeatX = imageAttribute.repeatX,
|
|
16970
16954
|
repeatY = imageAttribute.repeatY,
|
|
16955
|
+
x: originX = imageAttribute.x,
|
|
16956
|
+
y: originY = imageAttribute.y,
|
|
16971
16957
|
cornerRadius = imageAttribute.cornerRadius,
|
|
16972
16958
|
image: url
|
|
16973
16959
|
} = image.attribute,
|
|
@@ -16992,7 +16978,7 @@
|
|
|
16992
16978
|
} else context.drawImage(res.data, x, y, width, height);
|
|
16993
16979
|
needRestore && context.restore();
|
|
16994
16980
|
}
|
|
16995
|
-
this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
16981
|
+
doStroke && (strokeCb ? strokeCb(context, image.attribute, imageAttribute) : sVisible && (context.setStrokeStyle(image, image.attribute, originX - x, originY - y, imageAttribute), context.stroke())), this.afterRenderStep(image, context, x, y, doFill, !1, fVisible, !1, imageAttribute, drawContext, fillCb);
|
|
16996
16982
|
}
|
|
16997
16983
|
draw(image, renderService, drawContext) {
|
|
16998
16984
|
const {
|
|
@@ -17044,8 +17030,7 @@
|
|
|
17044
17030
|
if ("object" == typeof Reflect && "function" == typeof Reflect.metadata) return Reflect.metadata(k, v);
|
|
17045
17031
|
};
|
|
17046
17032
|
const DrawItemInterceptor = Symbol.for("DrawItemInterceptor");
|
|
17047
|
-
const tempDirtyBounds = new AABBBounds()
|
|
17048
|
-
tempBackupDirtyBounds = new AABBBounds();
|
|
17033
|
+
const tempDirtyBounds = new AABBBounds();
|
|
17049
17034
|
class ShadowRootDrawItemInterceptorContribution {
|
|
17050
17035
|
constructor() {
|
|
17051
17036
|
this.order = 1;
|
|
@@ -17062,11 +17047,11 @@
|
|
|
17062
17047
|
context: context
|
|
17063
17048
|
} = drawContext;
|
|
17064
17049
|
if (context.highPerformanceSave(), context.transformFromMatrix(graphic.transMatrix, !0), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds) {
|
|
17065
|
-
tempDirtyBounds.copy(drawContribution.dirtyBounds)
|
|
17050
|
+
tempDirtyBounds.copy(drawContribution.dirtyBounds);
|
|
17066
17051
|
const m = graphic.globalTransMatrix.getInverse();
|
|
17067
|
-
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m)
|
|
17052
|
+
drawContribution.dirtyBounds.copy(drawContribution.backupDirtyBounds).transformWithMatrix(m);
|
|
17068
17053
|
}
|
|
17069
|
-
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds &&
|
|
17054
|
+
return drawContribution.renderGroup(graphic.shadowRoot, drawContext, graphic.parent.globalTransMatrix), context.highPerformanceRestore(), drawContribution.dirtyBounds && drawContribution.backupDirtyBounds && drawContribution.dirtyBounds.copy(tempDirtyBounds), !0;
|
|
17070
17055
|
}
|
|
17071
17056
|
}
|
|
17072
17057
|
class DebugDrawItemInterceptorContribution {
|
|
@@ -19029,7 +19014,9 @@
|
|
|
19029
19014
|
let _isBrowserEnv;
|
|
19030
19015
|
function initIsBrowserEnv() {
|
|
19031
19016
|
if (null == _isBrowserEnv) try {
|
|
19032
|
-
|
|
19017
|
+
const canvas = document.createElement("canvas"),
|
|
19018
|
+
ctx = canvas.getContext("2d");
|
|
19019
|
+
_isBrowserEnv = !!(window && canvas.getBoundingClientRect && requestAnimationFrame && window.devicePixelRatio && ctx && ctx.isPointInPath && ctx.isPointInStroke), _isBrowserEnv && (_isBrowserEnv = !!document.createElement);
|
|
19033
19020
|
} catch (err) {
|
|
19034
19021
|
_isBrowserEnv = !1;
|
|
19035
19022
|
}
|
|
@@ -28573,7 +28560,7 @@
|
|
|
28573
28560
|
|
|
28574
28561
|
const roughModule = _roughModule;
|
|
28575
28562
|
|
|
28576
|
-
const version = "0.19.
|
|
28563
|
+
const version = "0.19.9-beta.1";
|
|
28577
28564
|
preLoadAllModule();
|
|
28578
28565
|
if (isBrowserEnv()) {
|
|
28579
28566
|
loadBrowserEnv(container);
|
|
@@ -28687,6 +28674,7 @@
|
|
|
28687
28674
|
exports.DefaultGroupBackgroundRenderContribution = DefaultGroupBackgroundRenderContribution;
|
|
28688
28675
|
exports.DefaultImageAttribute = DefaultImageAttribute;
|
|
28689
28676
|
exports.DefaultImageBackgroundRenderContribution = DefaultImageBackgroundRenderContribution;
|
|
28677
|
+
exports.DefaultImageRenderContribution = DefaultImageRenderContribution;
|
|
28690
28678
|
exports.DefaultLayout = DefaultLayout;
|
|
28691
28679
|
exports.DefaultLineAllocate = DefaultLineAllocate;
|
|
28692
28680
|
exports.DefaultLineAttribute = DefaultLineAttribute;
|
|
@@ -28952,6 +28940,7 @@
|
|
|
28952
28940
|
exports.defaultGraphicMemoryManager = defaultGraphicMemoryManager;
|
|
28953
28941
|
exports.defaultGroupBackgroundRenderContribution = defaultGroupBackgroundRenderContribution;
|
|
28954
28942
|
exports.defaultImageBackgroundRenderContribution = defaultImageBackgroundRenderContribution;
|
|
28943
|
+
exports.defaultImageRenderContribution = defaultImageRenderContribution;
|
|
28955
28944
|
exports.defaultLineAllocate = defaultLineAllocate;
|
|
28956
28945
|
exports.defaultPathAllocate = defaultPathAllocate;
|
|
28957
28946
|
exports.defaultRectAllocate = defaultRectAllocate;
|