@meta2d/core 1.0.40 → 1.0.42

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
@@ -280,28 +280,30 @@ var Meta2d = /** @class */ (function () {
280
280
  }
281
281
  }
282
282
  });
283
- (_b = pen.realTimes) === null || _b === void 0 ? void 0 : _b.forEach(function (realTime) {
284
- var _a;
285
- (_a = realTime.triggers) === null || _a === void 0 ? void 0 : _a.forEach(function (trigger) {
283
+ if (eventName === 'valueUpdate') {
284
+ (_b = pen.realTimes) === null || _b === void 0 ? void 0 : _b.forEach(function (realTime) {
286
285
  var _a;
287
- var flag = false;
288
- if (trigger.conditionType === 'and') {
289
- flag = trigger.conditions.every(function (condition) {
290
- return _this.judgeCondition(pen, realTime.key, condition);
291
- });
292
- }
293
- else if (trigger.conditionType === 'or') {
294
- flag = trigger.conditions.some(function (condition) {
295
- return _this.judgeCondition(pen, realTime.key, condition);
296
- });
297
- }
298
- if (flag) {
299
- (_a = trigger.actions) === null || _a === void 0 ? void 0 : _a.forEach(function (event) {
300
- _this.events[event.action](pen, event);
301
- });
302
- }
286
+ (_a = realTime.triggers) === null || _a === void 0 ? void 0 : _a.forEach(function (trigger) {
287
+ var _a;
288
+ var flag = false;
289
+ if (trigger.conditionType === 'and') {
290
+ flag = trigger.conditions.every(function (condition) {
291
+ return _this.judgeCondition(pen, realTime.key, condition);
292
+ });
293
+ }
294
+ else if (trigger.conditionType === 'or') {
295
+ flag = trigger.conditions.some(function (condition) {
296
+ return _this.judgeCondition(pen, realTime.key, condition);
297
+ });
298
+ }
299
+ if (flag) {
300
+ (_a = trigger.actions) === null || _a === void 0 ? void 0 : _a.forEach(function (event) {
301
+ _this.events[event.action](pen, event);
302
+ });
303
+ }
304
+ });
303
305
  });
304
- });
306
+ }
305
307
  // 事件冒泡,子执行完,父执行
306
308
  _this.doEvent(_this.store.pens[pen.parentId], eventName);
307
309
  };