targetj 1.0.108 → 1.0.109

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.
@@ -326,6 +326,12 @@ var BaseModel = exports.BaseModel = /*#__PURE__*/function () {
326
326
  value: function getScheduleTimeStamp(key) {
327
327
  return this.targetValues[key] ? this.targetValues[key].scheduleTimeStamp : undefined;
328
328
  }
329
+ }, {
330
+ key: "shouldScheduleRun",
331
+ value: function shouldScheduleRun(key) {
332
+ var _this$targets$key$tri, _this$targets$key;
333
+ return (_this$targets$key$tri = (_this$targets$key = this.targets[key]) === null || _this$targets$key === void 0 ? void 0 : _this$targets$key.triggerRerun) !== null && _this$targets$key$tri !== void 0 ? _this$targets$key$tri : true;
334
+ }
329
335
  }, {
330
336
  key: "getTargetInitialValue",
331
337
  value: function getTargetInitialValue(key) {
@@ -33,8 +33,9 @@ var BracketGenerator = exports.BracketGenerator = /*#__PURE__*/function () {
33
33
  return _createClass(BracketGenerator, null, [{
34
34
  key: "generate",
35
35
  value: function generate(page) {
36
+ var regenerate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
36
37
  var brackets = BracketGenerator.bracketMap[page.oid];
37
- if (!brackets || page.lastChildrenUpdate.deletions.length > 0) {
38
+ if (!brackets || page.lastChildrenUpdate.deletions.length > 0 || regenerate) {
38
39
  BracketGenerator.bracketMap[page.oid] = {
39
40
  brackets: BracketGenerator.buildTreeBottomUp(page, page.getChildren()),
40
41
  updateCount: 0
@@ -164,7 +165,7 @@ var BracketGenerator = exports.BracketGenerator = /*#__PURE__*/function () {
164
165
  from = i + 1;
165
166
  }
166
167
  }
167
- return brackets > bracketSize ? BracketGenerator.buildTreeBottomUp(page, brackets) : brackets;
168
+ return brackets.length > bracketSize ? BracketGenerator.buildTreeBottomUp(page, brackets) : brackets;
168
169
  }
169
170
  }, {
170
171
  key: "createBracket",
@@ -282,6 +282,7 @@ var EventListener = exports.EventListener = /*#__PURE__*/function () {
282
282
  } else if (diff > 600) {
283
283
  this.clearTouch();
284
284
  this.touchTimeStamp = 0;
285
+ this.touchCount = 0;
285
286
  }
286
287
  (0, _App.getRunScheduler)().schedule(runDelay, "scroll decay");
287
288
  }
@@ -105,7 +105,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
105
105
  child.addToStyleTargetList('x');
106
106
  child.addToStyleTargetList('y');
107
107
  child.calculateAbsolutePosition(child.getX(), child.getY());
108
- _TUtil.TUtil.isDefined(child.targets.isVisible) ? _App.tApp.targetManager.applyTargetValue(child, 'isVisible') : child.calcVisibility();
108
+ _TUtil.TUtil.isDefined(child.targets.isVisible) ? _TargetExecutor.TargetExecutor.executeDeclarativeTarget(child, 'isVisible') : child.calcVisibility();
109
109
  child.addToParentVisibleChildren();
110
110
  if (child.shouldCalculateChildren()) {
111
111
  this.calculateContainer(child, shouldCalculateChildTargets && container.shouldCalculateChildTargets() !== false);
@@ -136,7 +136,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
136
136
  container.calcContentWidthHeight();
137
137
  this.locationListStats.push("".concat(child.oid, "-").concat(child.updatingTargetList.length, "-").concat(_TUtil.TUtil.now() - this.startTime));
138
138
  }
139
- if (visibleChildrenCount !== container.visibleChildren.length && container.targets['onVisibleChildrenChange']) {
139
+ if ((visibleChildrenCount !== container.visibleChildren.length || container.visibleChildren.length === 0) && container.targets['onVisibleChildrenChange']) {
140
140
  this.activateTargets(container, container.targets['onVisibleChildrenChange']);
141
141
  }
142
142
  }
@@ -171,10 +171,12 @@ var RunScheduler = exports.RunScheduler = /*#__PURE__*/function () {
171
171
  } else {
172
172
  _this2.cycleStats.duration += cycleDuration;
173
173
  }
174
- if (_App.tApp.debugLevel > 0) {
174
+ if (_App.tApp.debugLevel === 1) {
175
175
  _TUtil.TUtil.log(_this2.cycleStats.duration > 10)("it took: ".concat(_this2.cycleStats.duration, ", RunId: ").concat(runId));
176
176
  _TUtil.TUtil.log(_this2.cycleStats.duration > 10)("locations: ".concat(_App.tApp.locationManager.locationListStats));
177
- _TUtil.TUtil.log(_App.tApp.debugLevel > 1)("request from: ".concat(runId, " delay: ").concat(delay));
177
+ }
178
+ if (_App.tApp.debugLevel === 2) {
179
+ _TUtil.TUtil.log(true)("request from: ".concat(runId, " delay: ").concat(delay));
178
180
  }
179
181
  _this2.runningFlag = false;
180
182
  _this2.runId = '';
package/build/TModel.js CHANGED
@@ -599,6 +599,16 @@ var TModel = exports.TModel = /*#__PURE__*/function (_BaseModel) {
599
599
  value: function getStyle() {
600
600
  return this.actualValues.style;
601
601
  }
602
+ }, {
603
+ key: "getBackground",
604
+ value: function getBackground() {
605
+ return this.actualValues.background;
606
+ }
607
+ }, {
608
+ key: "getBackgroundColor",
609
+ value: function getBackgroundColor() {
610
+ return this.actualValues.backgroundColor;
611
+ }
602
612
  }, {
603
613
  key: "getAttributes",
604
614
  value: function getAttributes() {
@@ -81,7 +81,9 @@ var TargetManager = exports.TargetManager = /*#__PURE__*/function () {
81
81
  }
82
82
  _TargetExecutor.TargetExecutor.executeDeclarativeTarget(tmodel, key);
83
83
  tmodel.setScheduleTimeStamp(key, _TUtil.TUtil.now());
84
- (0, _App.getRunScheduler)().schedule(tmodel.getTargetInterval(key), "actualInterval__".concat(tmodel.oid, "__").concat(key));
84
+ if (tmodel.shouldScheduleRun(key)) {
85
+ (0, _App.getRunScheduler)().schedule(tmodel.getTargetInterval(key), "actualInterval__".concat(tmodel.oid, "__").concat(key));
86
+ }
85
87
  }
86
88
  }, {
87
89
  key: "setActualValues",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "targetj",
3
- "version": "1.0.108",
3
+ "version": "1.0.109",
4
4
  "keywords": [
5
5
  "targetj"
6
6
  ],