targetj 1.0.232 → 1.0.234

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/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # TargetJS: State as Destination, Code Order as UI Sequence
2
2
 
3
+ ### Most frameworks are great at rendering state. TargetJS is designed for the journey between states.
4
+
3
5
  **[targetjs.io](https://targetjs.io)**
4
6
  [![MIT LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/livetrails/targetjs/blob/main/LICENSE)
5
7
  [![Stars](https://img.shields.io/github/stars/livetrails/targetjs.svg)](https://github.com/livetrails/targetjs/stargazers)
6
8
  [![npm version](https://img.shields.io/npm/v/targetj.svg)](https://www.npmjs.com/package/targetj)
7
9
 
8
- Most frameworks are great at rendering the next state. TargetJS is designed for the journey between states.
9
-
10
- TargetJS is a JavaScript UI framework that replaces the "State → Render" model with "State → transition → Render". It also lets code order directly define the UI sequence. It unifies UI, animations, API calls, event handling, and state into self-contained "Targets" that stack together like intelligent Lego pieces using Code-Ordered Reactivity.
10
+ TargetJS is a JavaScript UI framework that replaces the "State → Render" model with "State → Transition → Render". It also lets code order directly define the UI sequence. It unifies UI, animations, API calls, event handling, and state into self-contained "Targets" that stack together like intelligent Lego pieces using Code-Ordered Reactivity.
11
11
 
12
12
  It can be used as a full-featured framework or as a lightweight library alongside other frameworks. It is also a highly performant web framework, as shown in the [framework benchmark](https://krausest.github.io/js-framework-benchmark/current.html).
13
13
 
@@ -378,14 +378,14 @@ App({
378
378
  html() { return user.email; }
379
379
  }
380
380
  };
381
- },
382
- pause$$: { interval: 150 },
383
- highlightOne$$() {
384
- const user = this.getChild(0);
385
- user.setTarget('backgroundColor', { value: ['#fff7cc', '#fff1a8'], steps: 14 });
386
- user.setTarget('scale', { value: [1, 1.04, 1], steps: 14 });
387
- user.setTarget('boxShadow', '0 10px 24px rgba(0,0,0,.14)');
388
381
  }
382
+ },
383
+ pause$$: { interval: 150 },
384
+ highlightOne$$() {
385
+ const user = this.getChild(0);
386
+ user.setTarget('backgroundColor', { value: ['#fff7cc', '#fff1a8'], steps: 14 });
387
+ user.setTarget('scale', { value: [1, 1.04, 1], steps: 14 });
388
+ user.setTarget('boxShadow', '0 10px 24px rgba(0,0,0,.14)');
389
389
  }
390
390
  }
391
391
  }).mount('#app');
@@ -425,42 +425,47 @@ App({
425
425
  height() { return getScreenHeight(); },
426
426
  x() { return (getScreenWidth() - this.getWidth()) / 2; },
427
427
  containerOverflowMode: "always",
428
- addChildren() {
429
- return Array.from({ length: 10 }, (_, i) => ({
430
- height: 56,
431
- width() { return this.parent.getWidth(); },
432
- bottomMargin: 8,
433
- borderRadius: 12,
434
- backgroundColor: "white",
435
- boxShadow: "0 8px 20px rgba(0,0,0,0.08)",
436
- photo: {
437
- x: 10, y: 10, width: 34, height: 34,
438
- borderRadius: "50%",
439
- backgroundColor: "#ddd"
440
- },
441
- userName: {
442
- x: 60, y: 10, width: 180, height: 30,
443
- overflow: "hidden",
444
- borderRadius: 5,
445
- backgroundColor: "#ddd"
446
- },
447
- pause$$: { interval: 100 },
448
- fetch$$: "https://targetjs.io/api/randomUser",
449
- reveal$$() {
450
- const userName = this.getChild("userName");
451
- userName.setTarget("html", this.val("fetch$$").name);
452
- userName.setTarget("backgroundColor", { value: "white", steps: 20 });
453
- this.getChild("photo").setTarget("backgroundColor", { value: "#" + Math.random().toString(16).slice(-6), steps: 20 });
454
- },
455
- }));
428
+ addChildren: {
429
+ waitForChildren: 'visible',
430
+ value() {
431
+ return Array.from({ length: 10 }, (_, i) => ({
432
+ height: 56,
433
+ width() { return this.parent.getWidth(); },
434
+ bottomMargin: 8,
435
+ borderRadius: 12,
436
+ backgroundColor: "white",
437
+ boxShadow: "0 8px 20px rgba(0,0,0,0.08)",
438
+ photo: {
439
+ x: 10, y: 10, width: 34, height: 34,
440
+ borderRadius: "50%",
441
+ backgroundColor: "#ddd"
442
+ },
443
+ userName: {
444
+ x: 60, y: 10, width: 180, height: 30,
445
+ overflow: "hidden",
446
+ borderRadius: 5,
447
+ backgroundColor: "#ddd"
448
+ },
449
+ pause$$: { interval: 100 },
450
+ fetch$$: "https://targetjs.io/api/randomUser",
451
+ reveal$$() {
452
+ const userName = this.getChild("userName");
453
+ userName.setTarget("html", this.val("fetch$$").name);
454
+ userName.setTarget("backgroundColor", { value: "white", steps: 20 });
455
+ this.getChild("photo").setTarget("backgroundColor", { value: "#" + Math.random().toString(16).slice(-6), steps: 20 });
456
+ },
457
+ }));
458
+ }
456
459
  },
457
460
  wave$$: {
458
461
  interval: 30,
459
462
  cycles() { return this.visibleChildren.length; },
460
463
  value(i) {
461
464
  const child = this.visibleChildren[i];
462
- child.setTarget("scale", { value: [1, 1.06, 1], steps: 18 });
463
- child.setTarget("opacity", { value: [1, 0.92, 1], steps: 18 });
465
+ if (child) {
466
+ child.setTarget("scale", { value: [1, 1.06, 1], steps: 18 });
467
+ child.setTarget("opacity", { value: [1, 0.92, 1], steps: 18 });
468
+ }
464
469
  }
465
470
  },
466
471
  onScroll() {
@@ -51,6 +51,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
51
51
  this.resumePausedList = [];
52
52
  this.resumePausedMap = {};
53
53
  this.resumeScheduled = false;
54
+ this.calcEpoch = 0;
54
55
  }
55
56
  return _createClass(LocationManager, [{
56
57
  key: "clear",
@@ -91,6 +92,7 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
91
92
  value: function () {
92
93
  var _calculateAll = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
93
94
  var budgetMs,
95
+ calcEpoch,
94
96
  stack,
95
97
  ctx,
96
98
  _args = arguments;
@@ -98,42 +100,49 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
98
100
  while (1) switch (_context.prev = _context.next) {
99
101
  case 0:
100
102
  budgetMs = _args.length > 0 && _args[0] !== undefined ? _args[0] : 8;
103
+ calcEpoch = this.calcEpoch;
101
104
  if (!this.calcBusy) {
102
- _context.next = 4;
105
+ _context.next = 5;
103
106
  break;
104
107
  }
105
108
  this.calcQueued = true;
106
109
  return _context.abrupt("return");
107
- case 4:
110
+ case 5:
108
111
  this.calcBusy = true;
109
112
  this.hasLocationList.length = 0;
110
113
  this.hasLocationMap = {};
111
114
  this.locationListStats = [];
112
- stack = [];
113
- stack.push({
115
+ stack = [{
114
116
  container: (0, _App.tRoot)(),
115
117
  stage: 'init',
116
118
  children: [],
117
119
  viewport: undefined,
118
120
  index: 0
119
- });
121
+ }];
120
122
  ctx = {
121
123
  budgetMs: budgetMs,
122
- sliceStart: _TUtil.TUtil.now()
124
+ sliceStart: _TUtil.TUtil.now(),
125
+ calcEpoch: calcEpoch
123
126
  };
124
127
  _context.next = 13;
125
128
  return this.processStack(stack, ctx);
126
129
  case 13:
130
+ if (!(ctx.calcEpoch !== this.calcEpoch)) {
131
+ _context.next = 15;
132
+ break;
133
+ }
134
+ return _context.abrupt("return");
135
+ case 15:
127
136
  this.processAfterStack();
128
137
  this.scheduleResumePaused();
129
138
  this.calcBusy = false;
130
139
  if (!this.calcQueued) {
131
- _context.next = 19;
140
+ _context.next = 21;
132
141
  break;
133
142
  }
134
143
  this.calcQueued = false;
135
144
  return _context.abrupt("return", this.calculateAll(budgetMs));
136
- case 19:
145
+ case 21:
137
146
  case "end":
138
147
  return _context.stop();
139
148
  }
@@ -144,6 +153,13 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
144
153
  }
145
154
  return calculateAll;
146
155
  }()
156
+ }, {
157
+ key: "cancelCurrentCalculation",
158
+ value: function cancelCurrentCalculation() {
159
+ this.calcEpoch++;
160
+ this.calcBusy = false;
161
+ this.calcQueued = false;
162
+ }
147
163
  }, {
148
164
  key: "processStack",
149
165
  value: function () {
@@ -294,19 +310,31 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
294
310
  };
295
311
  case 4:
296
312
  if (!stack.length) {
297
- _context2.next = 21;
313
+ _context2.next = 25;
314
+ break;
315
+ }
316
+ if (!(ctx.calcEpoch !== this.calcEpoch)) {
317
+ _context2.next = 7;
298
318
  break;
299
319
  }
320
+ return _context2.abrupt("return");
321
+ case 7:
300
322
  if (!(_TUtil.TUtil.now() - ctx.sliceStart > ctx.budgetMs)) {
301
- _context2.next = 10;
323
+ _context2.next = 14;
302
324
  break;
303
325
  }
304
- _context2.next = 8;
326
+ _context2.next = 10;
305
327
  return new Promise(requestAnimationFrame);
306
- case 8:
328
+ case 10:
329
+ if (!(ctx.calcEpoch !== this.calcEpoch)) {
330
+ _context2.next = 12;
331
+ break;
332
+ }
333
+ return _context2.abrupt("return");
334
+ case 12:
307
335
  ctx.sliceStart = _TUtil.TUtil.now();
308
336
  return _context2.abrupt("continue", 4);
309
- case 10:
337
+ case 14:
310
338
  job = stack[stack.length - 1];
311
339
  if (job.stage === 'init') {
312
340
  container = job.container;
@@ -333,19 +361,19 @@ var LocationManager = exports.LocationManager = /*#__PURE__*/function () {
333
361
  processAfterChild(job);
334
362
  }
335
363
  if (!(job.index >= job.children.length)) {
336
- _context2.next = 18;
364
+ _context2.next = 22;
337
365
  break;
338
366
  }
339
367
  processAfterAllChildren(job);
340
368
  stack.pop();
341
369
  return _context2.abrupt("continue", 4);
342
- case 18:
370
+ case 22:
343
371
  if (job.stage === 'child') {
344
372
  processChild(job);
345
373
  }
346
374
  _context2.next = 4;
347
375
  break;
348
- case 21:
376
+ case 25:
349
377
  case "end":
350
378
  return _context2.stop();
351
379
  }
@@ -57,19 +57,28 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
57
57
  key: "openPage",
58
58
  value: function () {
59
59
  var _openPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(link) {
60
- var visibles, newVisibles;
60
+ var shouldReset,
61
+ visibles,
62
+ newVisibles,
63
+ _args = arguments;
61
64
  return _regeneratorRuntime().wrap(function _callee$(_context) {
62
65
  while (1) switch (_context.prev = _context.next) {
63
66
  case 0:
64
- _context.next = 2;
65
- return _App.tApp.stop();
66
- case 2:
67
+ shouldReset = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
68
+ if (!shouldReset) {
69
+ _context.next = 7;
70
+ break;
71
+ }
67
72
  _context.next = 4;
68
- return _App.tApp.reset();
73
+ return _App.tApp.stop();
69
74
  case 4:
75
+ (0, _App.getLocationManager)().cancelCurrentCalculation();
76
+ _context.next = 7;
77
+ return _App.tApp.reset();
78
+ case 7:
70
79
  link = _TUtil.TUtil.getFullLink(link);
71
80
  if (this.pageCache[link]) {
72
- _context.next = 15;
81
+ _context.next = 18;
73
82
  break;
74
83
  }
75
84
  _App.tApp.tRoot.$dom.innerHTML("");
@@ -77,12 +86,12 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
77
86
  _App.App.tmodelIdMap = {};
78
87
  _App.tApp.tRoot = _App.tApp.tRootFactory();
79
88
  this.lastLink = link;
80
- _context.next = 13;
89
+ _context.next = 16;
81
90
  return _App.tApp.start();
82
- case 13:
83
- _context.next = 30;
91
+ case 16:
92
+ _context.next = 34;
84
93
  break;
85
- case 15:
94
+ case 18:
86
95
  _App.tApp.tRoot = this.pageCache[link].tRoot;
87
96
  _App.App.oids = this.pageCache[link].oids;
88
97
  _App.App.tmodelIdMap = this.pageCache[link].tmodelIdMap;
@@ -93,17 +102,18 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
93
102
  visibles.forEach(function (tmodel) {
94
103
  tmodel.visibilityStatus = undefined;
95
104
  });
105
+ _App.tApp.manager.activatePendingTargetsAfterDom(visibles);
96
106
  _App.tApp.manager.visibleOidMap = _objectSpread({}, this.pageCache[link].visibleOidMap);
97
107
  newVisibles.forEach(function (visible) {
98
108
  _App.tApp.manager.visibleOidMap[visible.oid] = visible;
99
109
  });
100
110
  window.scrollTo(this.pageCache[link].scrollLeft, this.pageCache[link].scrollTop);
101
111
  this.lastLink = link;
102
- _context.next = 29;
112
+ _context.next = 33;
103
113
  return _App.tApp.start();
104
- case 29:
114
+ case 33:
105
115
  (0, _App.getRunScheduler)().restoreSnapshot(this.pageCache[link].runSnapshot);
106
- case 30:
116
+ case 34:
107
117
  case "end":
108
118
  return _context.stop();
109
119
  }
@@ -118,30 +128,25 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
118
128
  key: "openLinkFromHistory",
119
129
  value: function () {
120
130
  var _openLinkFromHistory = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(state) {
131
+ var link;
121
132
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
122
133
  while (1) switch (_context2.prev = _context2.next) {
123
134
  case 0:
124
- if (!state.link) {
125
- _context2.next = 6;
135
+ link = state.link || state.browserUrl;
136
+ if (link) {
137
+ _context2.next = 3;
126
138
  break;
127
139
  }
128
- this.onPageClose();
129
- _context2.next = 4;
130
- return this.openLink(state.link, false);
131
- case 4:
132
- _context2.next = 10;
133
- break;
134
- case 6:
135
- if (!state.browserUrl) {
136
- _context2.next = 10;
137
- break;
140
+ return _context2.abrupt("return");
141
+ case 3:
142
+ if (state.browserUrl) {
143
+ history.replaceState({
144
+ link: link
145
+ }, "", link);
138
146
  }
139
- history.replaceState({
140
- link: state.browserUrl
141
- }, "", state.browserUrl);
142
- _context2.next = 10;
143
- return this.openPage(state.browserUrl);
144
- case 10:
147
+ _context2.next = 6;
148
+ return this.openLink(link, false);
149
+ case 6:
145
150
  case "end":
146
151
  return _context2.stop();
147
152
  }
@@ -166,6 +171,7 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
166
171
  value: function () {
167
172
  var _openLink = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(link) {
168
173
  var updateHistory,
174
+ runSnapshot,
169
175
  html,
170
176
  _args3 = arguments;
171
177
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
@@ -173,32 +179,42 @@ var PageManager = exports.PageManager = /*#__PURE__*/function () {
173
179
  case 0:
174
180
  updateHistory = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : true;
175
181
  link = _TUtil.TUtil.getFullLink(link);
176
- if (this.lastLink) {
177
- _App.tApp.tRoot.$dom = _$Dom.$Dom.query('#tgjs-root') ? new _$Dom.$Dom('#tgjs-root') : new _$Dom.$Dom('body');
178
- html = _App.tApp.tRoot.$dom.innerHTML();
179
- this.onPageClose();
180
- this.pageCache[this.lastLink] = {
181
- link: this.lastLink,
182
- html: html,
183
- oids: _objectSpread({}, _App.App.oids),
184
- tmodelIdMap: _objectSpread({}, _App.App.tmodelIdMap),
185
- visibleOidMap: _objectSpread({}, _App.tApp.manager.visibleOidMap),
186
- scrollLeft: _$Dom.$Dom.getWindowScrollLeft() || 0,
187
- scrollTop: _$Dom.$Dom.getWindowScrollTop() || 0,
188
- tRoot: _App.tApp.tRoot,
189
- runSnapshot: (0, _App.getRunScheduler)().getSnapshot()
190
- };
182
+ if (!this.lastLink) {
183
+ _context3.next = 13;
184
+ break;
191
185
  }
186
+ runSnapshot = (0, _App.getRunScheduler)().getSnapshot();
187
+ _context3.next = 6;
188
+ return _App.tApp.stop();
189
+ case 6:
190
+ (0, _App.getLocationManager)().cancelCurrentCalculation();
191
+ this.onPageClose();
192
+ _App.tApp.tRoot.$dom = _$Dom.$Dom.query('#tgjs-root') ? new _$Dom.$Dom('#tgjs-root') : new _$Dom.$Dom('body');
193
+ html = _App.tApp.tRoot.$dom.innerHTML();
194
+ this.pageCache[this.lastLink] = {
195
+ link: this.lastLink,
196
+ html: html,
197
+ oids: _objectSpread({}, _App.App.oids),
198
+ tmodelIdMap: _objectSpread({}, _App.App.tmodelIdMap),
199
+ visibleOidMap: _objectSpread({}, _App.tApp.manager.visibleOidMap),
200
+ scrollLeft: _$Dom.$Dom.getWindowScrollLeft() || 0,
201
+ scrollTop: _$Dom.$Dom.getWindowScrollTop() || 0,
202
+ tRoot: _App.tApp.tRoot,
203
+ runSnapshot: runSnapshot
204
+ };
205
+ _context3.next = 13;
206
+ return _App.tApp.reset();
207
+ case 13:
192
208
  if (updateHistory) {
193
209
  history.pushState({
194
210
  link: link
195
211
  }, "", link);
196
212
  }
197
- _context3.next = 6;
198
- return this.openPage(link);
199
- case 6:
213
+ _context3.next = 16;
214
+ return this.openPage(link, false);
215
+ case 16:
200
216
  (0, _App.getRunScheduler)().schedule(0, "pagemanager-processOpenLink");
201
- case 7:
217
+ case 17:
202
218
  case "end":
203
219
  return _context3.stop();
204
220
  }
package/build/TModel.js CHANGED
@@ -326,6 +326,16 @@ var TModel = exports.TModel = /*#__PURE__*/function (_BaseModel) {
326
326
  }
327
327
  return this;
328
328
  }
329
+ }, {
330
+ key: "exists",
331
+ value: function exists() {
332
+ var parent = this.getParent();
333
+ if (!parent) {
334
+ return false;
335
+ }
336
+ parent.getChildren();
337
+ return parent.allChildrenMap[this.oid] === this;
338
+ }
329
339
  }, {
330
340
  key: "addToParentVisibleChildren",
331
341
  value: function addToParentVisibleChildren() {
@@ -92,7 +92,7 @@ var TModelManager = exports.TModelManager = /*#__PURE__*/function () {
92
92
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
93
93
  var tmodel = _step.value;
94
94
  lastVisibleMap[tmodel.oid] = undefined;
95
- if (!_App.App.tmodelIdMap[tmodel.oid]) {
95
+ if (!tmodel.exists()) {
96
96
  if (tmodel.hasDom()) {
97
97
  this.addToInvisibleDom(tmodel);
98
98
  }
@@ -181,7 +181,7 @@ var TModelManager = exports.TModelManager = /*#__PURE__*/function () {
181
181
  return v !== undefined;
182
182
  }).forEach(function (tmodel) {
183
183
  if (tmodel.hasDom()) {
184
- if (!_App.App.tmodelIdMap[tmodel.oid] || !tmodel.isIncluded()) {
184
+ if (!tmodel.exists() || !tmodel.isIncluded()) {
185
185
  _this.addToInvisibleDom(tmodel);
186
186
  }
187
187
  }
@@ -467,6 +467,7 @@ var TModelManager = exports.TModelManager = /*#__PURE__*/function () {
467
467
  if (pending !== null && pending !== void 0 && pending.size) {
468
468
  for (var _i = 0, _arr = _toConsumableArray(pending); _i < _arr.length; _i++) {
469
469
  var target = _arr[_i];
470
+ _TargetUtil.TargetUtil.cleanupTarget(tmodel, target);
470
471
  _TargetUtil.TargetUtil.shouldActivateNextTarget(tmodel, target);
471
472
  }
472
473
  }
package/build/TUtil.js CHANGED
@@ -86,12 +86,12 @@ var TUtil = exports.TUtil = /*#__PURE__*/function () {
86
86
  while (container && container !== (0, _App.tRoot)()) {
87
87
  if (this.shouldClipByAncestor(container)) {
88
88
  var ancestorRect = this.getAncestorViewportRect(container);
89
- rect = rect ? this.intersectVisibilityRects(rect, ancestorRect) : ancestorRect;
89
+ rect = rect && !container.allTargetMap['onWindowScroll'] ? this.intersectVisibilityRects(rect, ancestorRect) : ancestorRect;
90
90
  if (rect.r <= rect.x || rect.b <= rect.y) {
91
91
  break;
92
92
  }
93
93
  }
94
- container = container.getParent();
94
+ container = container.getRealParent();
95
95
  }
96
96
  return rect;
97
97
  }
@@ -297,7 +297,8 @@ var TUtil = exports.TUtil = /*#__PURE__*/function () {
297
297
  var g = _step.value;
298
298
  var gtab = g.isVisible() ? tab + '| ' : tab + 'x ';
299
299
  if (g.type === 'BI') {
300
- console.log("".concat(gtab).concat(g.oid, " v:").concat(g.isVisible(), " x:").concat(Math.floor(g.getX()), " y:").concat(Math.floor(g.getY()), ", absX:").concat(Math.floor(g.absX), ", absY:").concat(Math.floor(g.absY), " n-e-s:").concat(Math.floor(g.viewport.yNorth), "-").concat(Math.floor(g.viewport.yEast), "-").concat(Math.floor(g.viewport.ySouth), " w:").concat(Math.floor(g.getBaseWidth()), " ww:").concat(Math.floor(g.getContentWidth()), " h:").concat(Math.floor(g.getBaseHeight()), " hh:").concat(Math.floor(g.getContentHeight())));
300
+ var _g$viewport, _g$viewport2, _g$viewport3;
301
+ console.log("".concat(gtab).concat(g.oid, " v:").concat(g.isVisible(), " x:").concat(Math.floor(g.getX()), " y:").concat(Math.floor(g.getY()), ", absX:").concat(Math.floor(g.absX), ", absY:").concat(Math.floor(g.absY), " n-e-s:").concat(Math.floor((_g$viewport = g.viewport) === null || _g$viewport === void 0 ? void 0 : _g$viewport.yNorth), "-").concat(Math.floor((_g$viewport2 = g.viewport) === null || _g$viewport2 === void 0 ? void 0 : _g$viewport2.yEast), "-").concat(Math.floor((_g$viewport3 = g.viewport) === null || _g$viewport3 === void 0 ? void 0 : _g$viewport3.ySouth), " w:").concat(Math.floor(g.getBaseWidth()), " ww:").concat(Math.floor(g.getContentWidth()), " h:").concat(Math.floor(g.getBaseHeight()), " hh:").concat(Math.floor(g.getContentHeight())));
301
302
  } else {
302
303
  console.log("".concat(gtab).concat(g.oid, " v:").concat(g.isVisible(), " x:").concat(Math.floor(g.getX()), " y:").concat(Math.floor(g.getY()), " absX:").concat(Math.floor(g.absX), ", absY:").concat(Math.floor(g.absY), " w:").concat(Math.floor(g.getWidth()), " h:").concat(Math.floor(g.getHeight()), " hc:").concat(Math.floor(g.getContentHeight())));
303
304
  }