@meta2d/core 1.1.9 → 1.1.11

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/src/core.js CHANGED
@@ -127,6 +127,11 @@ export class Meta2d {
127
127
  }
128
128
  }
129
129
  this.store.options = Object.assign(this.store.options, opts);
130
+ if (opts.roles && this.store.data.pens?.length) {
131
+ for (const pen of this.store.data.pens) {
132
+ calcInView(pen);
133
+ }
134
+ }
130
135
  if (this.canvas && opts.scroll !== undefined) {
131
136
  if (opts.scroll) {
132
137
  !this.canvas.scroll && (this.canvas.scroll = new Scroll(this.canvas));
@@ -1139,7 +1144,7 @@ export class Meta2d {
1139
1144
  const domNum = this.store.data.pens.filter((pen) => pen.name.endsWith('Dom') ||
1140
1145
  isDomShapes.includes(pen.name) ||
1141
1146
  this.store.options.domShapes.includes(pen.name) ||
1142
- pen.externElement).length;
1147
+ pen.externElement || pen.isDom).length;
1143
1148
  const aningNum = this.store.animates.size;
1144
1149
  let dataPointsNum = 0;
1145
1150
  Object.keys(this.store.bind).forEach((key) => {