@idraw/core 0.4.0-beta.7 → 0.4.0-beta.8
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/dist/index.global.js +342 -289
- package/dist/index.global.min.js +1 -1
- package/package.json +5 -5
package/dist/index.global.js
CHANGED
|
@@ -358,7 +358,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
358
358
|
fontWeight: fontWeight$1,
|
|
359
359
|
strokeWidth
|
|
360
360
|
};
|
|
361
|
-
var __classPrivateFieldSet$
|
|
361
|
+
var __classPrivateFieldSet$9 = function(receiver, state, value, kind, f) {
|
|
362
362
|
if (kind === "m")
|
|
363
363
|
throw new TypeError("Private method is not writable");
|
|
364
364
|
if (kind === "a" && !f)
|
|
@@ -367,7 +367,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
367
367
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
368
368
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
369
369
|
};
|
|
370
|
-
var __classPrivateFieldGet$
|
|
370
|
+
var __classPrivateFieldGet$9 = function(receiver, state, kind, f) {
|
|
371
371
|
if (kind === "a" && !f)
|
|
372
372
|
throw new TypeError("Private accessor was defined without a getter");
|
|
373
373
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -379,17 +379,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
379
379
|
constructor(ctx, opts) {
|
|
380
380
|
_Context2D_ctx.set(this, void 0);
|
|
381
381
|
_Context2D_opts.set(this, void 0);
|
|
382
|
-
__classPrivateFieldSet$
|
|
383
|
-
__classPrivateFieldSet$
|
|
382
|
+
__classPrivateFieldSet$9(this, _Context2D_ctx, ctx, "f");
|
|
383
|
+
__classPrivateFieldSet$9(this, _Context2D_opts, Object.assign({ devicePixelRatio: 1, offscreenCanvas: null }, opts), "f");
|
|
384
384
|
}
|
|
385
385
|
$undoPixelRatio(num) {
|
|
386
|
-
return num / __classPrivateFieldGet$
|
|
386
|
+
return num / __classPrivateFieldGet$9(this, _Context2D_opts, "f").devicePixelRatio;
|
|
387
387
|
}
|
|
388
388
|
$doPixelRatio(num) {
|
|
389
|
-
return __classPrivateFieldGet$
|
|
389
|
+
return __classPrivateFieldGet$9(this, _Context2D_opts, "f").devicePixelRatio * num;
|
|
390
390
|
}
|
|
391
391
|
$getContext() {
|
|
392
|
-
return __classPrivateFieldGet$
|
|
392
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f");
|
|
393
393
|
}
|
|
394
394
|
$setFont(opts) {
|
|
395
395
|
const strList = [];
|
|
@@ -398,17 +398,17 @@ var __privateMethod = (obj, member, method) => {
|
|
|
398
398
|
}
|
|
399
399
|
strList.push(`${this.$doPixelRatio(opts.fontSize || 12)}px`);
|
|
400
400
|
strList.push(`${opts.fontFamily || "sans-serif"}`);
|
|
401
|
-
__classPrivateFieldGet$
|
|
401
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").font = `${strList.join(" ")}`;
|
|
402
402
|
}
|
|
403
403
|
$getOffscreenCanvas() {
|
|
404
|
-
return __classPrivateFieldGet$
|
|
404
|
+
return __classPrivateFieldGet$9(this, _Context2D_opts, "f").offscreenCanvas;
|
|
405
405
|
}
|
|
406
406
|
$resize(opts) {
|
|
407
407
|
const { width, height, devicePixelRatio, resetStyle } = opts;
|
|
408
|
-
const { canvas } = __classPrivateFieldGet$
|
|
408
|
+
const { canvas } = __classPrivateFieldGet$9(this, _Context2D_ctx, "f");
|
|
409
409
|
canvas.width = width * devicePixelRatio;
|
|
410
410
|
canvas.height = height * devicePixelRatio;
|
|
411
|
-
__classPrivateFieldSet$
|
|
411
|
+
__classPrivateFieldSet$9(this, _Context2D_opts, Object.assign(Object.assign({}, __classPrivateFieldGet$9(this, _Context2D_opts, "f")), {
|
|
412
412
|
devicePixelRatio
|
|
413
413
|
}), "f");
|
|
414
414
|
if (resetStyle === true) {
|
|
@@ -417,8 +417,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
$getSize() {
|
|
420
|
-
const { devicePixelRatio } = __classPrivateFieldGet$
|
|
421
|
-
const { width, height } = __classPrivateFieldGet$
|
|
420
|
+
const { devicePixelRatio } = __classPrivateFieldGet$9(this, _Context2D_opts, "f");
|
|
421
|
+
const { width, height } = __classPrivateFieldGet$9(this, _Context2D_ctx, "f").canvas;
|
|
422
422
|
return {
|
|
423
423
|
width: width / devicePixelRatio,
|
|
424
424
|
height: height / devicePixelRatio,
|
|
@@ -426,125 +426,125 @@ var __privateMethod = (obj, member, method) => {
|
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
get canvas() {
|
|
429
|
-
return __classPrivateFieldGet$
|
|
429
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").canvas;
|
|
430
430
|
}
|
|
431
431
|
get fillStyle() {
|
|
432
|
-
return __classPrivateFieldGet$
|
|
432
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").fillStyle;
|
|
433
433
|
}
|
|
434
434
|
set fillStyle(value) {
|
|
435
|
-
__classPrivateFieldGet$
|
|
435
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").fillStyle = value;
|
|
436
436
|
}
|
|
437
437
|
get strokeStyle() {
|
|
438
|
-
return __classPrivateFieldGet$
|
|
438
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").strokeStyle;
|
|
439
439
|
}
|
|
440
440
|
set strokeStyle(color2) {
|
|
441
|
-
__classPrivateFieldGet$
|
|
441
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").strokeStyle = color2;
|
|
442
442
|
}
|
|
443
443
|
get lineWidth() {
|
|
444
|
-
return this.$undoPixelRatio(__classPrivateFieldGet$
|
|
444
|
+
return this.$undoPixelRatio(__classPrivateFieldGet$9(this, _Context2D_ctx, "f").lineWidth);
|
|
445
445
|
}
|
|
446
446
|
set lineWidth(w2) {
|
|
447
|
-
__classPrivateFieldGet$
|
|
447
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").lineWidth = this.$doPixelRatio(w2);
|
|
448
448
|
}
|
|
449
449
|
get textAlign() {
|
|
450
|
-
return __classPrivateFieldGet$
|
|
450
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").textAlign;
|
|
451
451
|
}
|
|
452
452
|
set textAlign(align) {
|
|
453
|
-
__classPrivateFieldGet$
|
|
453
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").textAlign = align;
|
|
454
454
|
}
|
|
455
455
|
get textBaseline() {
|
|
456
|
-
return __classPrivateFieldGet$
|
|
456
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").textBaseline;
|
|
457
457
|
}
|
|
458
458
|
set textBaseline(baseline) {
|
|
459
|
-
__classPrivateFieldGet$
|
|
459
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").textBaseline = baseline;
|
|
460
460
|
}
|
|
461
461
|
get globalAlpha() {
|
|
462
|
-
return __classPrivateFieldGet$
|
|
462
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").globalAlpha;
|
|
463
463
|
}
|
|
464
464
|
set globalAlpha(alpha) {
|
|
465
|
-
__classPrivateFieldGet$
|
|
465
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").globalAlpha = alpha;
|
|
466
466
|
}
|
|
467
467
|
get shadowColor() {
|
|
468
|
-
return __classPrivateFieldGet$
|
|
468
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowColor;
|
|
469
469
|
}
|
|
470
470
|
set shadowColor(color2) {
|
|
471
|
-
__classPrivateFieldGet$
|
|
471
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowColor = color2;
|
|
472
472
|
}
|
|
473
473
|
get shadowOffsetX() {
|
|
474
|
-
return this.$undoPixelRatio(__classPrivateFieldGet$
|
|
474
|
+
return this.$undoPixelRatio(__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowOffsetX);
|
|
475
475
|
}
|
|
476
476
|
set shadowOffsetX(offsetX) {
|
|
477
|
-
__classPrivateFieldGet$
|
|
477
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowOffsetX = this.$doPixelRatio(offsetX);
|
|
478
478
|
}
|
|
479
479
|
get shadowOffsetY() {
|
|
480
|
-
return this.$undoPixelRatio(__classPrivateFieldGet$
|
|
480
|
+
return this.$undoPixelRatio(__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowOffsetY);
|
|
481
481
|
}
|
|
482
482
|
set shadowOffsetY(offsetY) {
|
|
483
|
-
__classPrivateFieldGet$
|
|
483
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowOffsetY = this.$doPixelRatio(offsetY);
|
|
484
484
|
}
|
|
485
485
|
get shadowBlur() {
|
|
486
|
-
return this.$undoPixelRatio(__classPrivateFieldGet$
|
|
486
|
+
return this.$undoPixelRatio(__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowBlur);
|
|
487
487
|
}
|
|
488
488
|
set shadowBlur(blur) {
|
|
489
|
-
__classPrivateFieldGet$
|
|
489
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").shadowBlur = this.$doPixelRatio(blur);
|
|
490
490
|
}
|
|
491
491
|
get lineCap() {
|
|
492
|
-
return __classPrivateFieldGet$
|
|
492
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").lineCap;
|
|
493
493
|
}
|
|
494
494
|
set lineCap(lineCap) {
|
|
495
|
-
__classPrivateFieldGet$
|
|
495
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").lineCap = lineCap;
|
|
496
496
|
}
|
|
497
497
|
get globalCompositeOperation() {
|
|
498
|
-
return __classPrivateFieldGet$
|
|
498
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").globalCompositeOperation;
|
|
499
499
|
}
|
|
500
500
|
set globalCompositeOperation(operations) {
|
|
501
|
-
__classPrivateFieldGet$
|
|
501
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").globalCompositeOperation = operations;
|
|
502
502
|
}
|
|
503
503
|
fill(...args) {
|
|
504
|
-
return __classPrivateFieldGet$
|
|
504
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").fill(...args);
|
|
505
505
|
}
|
|
506
506
|
arc(x2, y2, radius, startAngle, endAngle, anticlockwise) {
|
|
507
|
-
return __classPrivateFieldGet$
|
|
507
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").arc(this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(radius), startAngle, endAngle, anticlockwise);
|
|
508
508
|
}
|
|
509
509
|
rect(x2, y2, w2, h2) {
|
|
510
|
-
return __classPrivateFieldGet$
|
|
510
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").rect(this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(w2), this.$doPixelRatio(h2));
|
|
511
511
|
}
|
|
512
512
|
fillRect(x2, y2, w2, h2) {
|
|
513
|
-
return __classPrivateFieldGet$
|
|
513
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").fillRect(this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(w2), this.$doPixelRatio(h2));
|
|
514
514
|
}
|
|
515
515
|
clearRect(x2, y2, w2, h2) {
|
|
516
|
-
return __classPrivateFieldGet$
|
|
516
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").clearRect(this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(w2), this.$doPixelRatio(h2));
|
|
517
517
|
}
|
|
518
518
|
beginPath() {
|
|
519
|
-
return __classPrivateFieldGet$
|
|
519
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").beginPath();
|
|
520
520
|
}
|
|
521
521
|
closePath() {
|
|
522
|
-
return __classPrivateFieldGet$
|
|
522
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").closePath();
|
|
523
523
|
}
|
|
524
524
|
lineTo(x2, y2) {
|
|
525
|
-
return __classPrivateFieldGet$
|
|
525
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").lineTo(this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
526
526
|
}
|
|
527
527
|
moveTo(x2, y2) {
|
|
528
|
-
return __classPrivateFieldGet$
|
|
528
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").moveTo(this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
529
529
|
}
|
|
530
530
|
arcTo(x1, y1, x2, y2, radius) {
|
|
531
|
-
return __classPrivateFieldGet$
|
|
531
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").arcTo(this.$doPixelRatio(x1), this.$doPixelRatio(y1), this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(radius));
|
|
532
532
|
}
|
|
533
533
|
getLineDash() {
|
|
534
|
-
return __classPrivateFieldGet$
|
|
534
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").getLineDash();
|
|
535
535
|
}
|
|
536
536
|
setLineDash(nums) {
|
|
537
537
|
const dash = nums.map((n) => this.$doPixelRatio(n));
|
|
538
|
-
return __classPrivateFieldGet$
|
|
538
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").setLineDash(dash);
|
|
539
539
|
}
|
|
540
540
|
stroke(path) {
|
|
541
|
-
return path ? __classPrivateFieldGet$
|
|
541
|
+
return path ? __classPrivateFieldGet$9(this, _Context2D_ctx, "f").stroke(path) : __classPrivateFieldGet$9(this, _Context2D_ctx, "f").stroke();
|
|
542
542
|
}
|
|
543
543
|
translate(x2, y2) {
|
|
544
|
-
return __classPrivateFieldGet$
|
|
544
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").translate(this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
545
545
|
}
|
|
546
546
|
rotate(angle2) {
|
|
547
|
-
return __classPrivateFieldGet$
|
|
547
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").rotate(angle2);
|
|
548
548
|
}
|
|
549
549
|
drawImage(...args) {
|
|
550
550
|
const image = args[0];
|
|
@@ -557,64 +557,64 @@ var __privateMethod = (obj, member, method) => {
|
|
|
557
557
|
const dw = args[args.length - 2];
|
|
558
558
|
const dh = args[args.length - 1];
|
|
559
559
|
if (args.length === 9) {
|
|
560
|
-
return __classPrivateFieldGet$
|
|
560
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").drawImage(image, this.$doPixelRatio(sx), this.$doPixelRatio(sy), this.$doPixelRatio(sw), this.$doPixelRatio(sh), this.$doPixelRatio(dx), this.$doPixelRatio(dy), this.$doPixelRatio(dw), this.$doPixelRatio(dh));
|
|
561
561
|
} else {
|
|
562
|
-
return __classPrivateFieldGet$
|
|
562
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").drawImage(image, this.$doPixelRatio(dx), this.$doPixelRatio(dy), this.$doPixelRatio(dw), this.$doPixelRatio(dh));
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
565
|
createPattern(image, repetition) {
|
|
566
|
-
return __classPrivateFieldGet$
|
|
566
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").createPattern(image, repetition);
|
|
567
567
|
}
|
|
568
568
|
measureText(text2) {
|
|
569
|
-
const textMetrics = __classPrivateFieldGet$
|
|
569
|
+
const textMetrics = __classPrivateFieldGet$9(this, _Context2D_ctx, "f").measureText(text2);
|
|
570
570
|
return textMetrics;
|
|
571
571
|
}
|
|
572
572
|
fillText(text2, x2, y2, maxWidth) {
|
|
573
573
|
if (maxWidth !== void 0) {
|
|
574
|
-
return __classPrivateFieldGet$
|
|
574
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").fillText(text2, this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(maxWidth));
|
|
575
575
|
} else {
|
|
576
|
-
return __classPrivateFieldGet$
|
|
576
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").fillText(text2, this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
strokeText(text2, x2, y2, maxWidth) {
|
|
580
580
|
if (maxWidth !== void 0) {
|
|
581
|
-
return __classPrivateFieldGet$
|
|
581
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").strokeText(text2, this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(maxWidth));
|
|
582
582
|
} else {
|
|
583
|
-
return __classPrivateFieldGet$
|
|
583
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").strokeText(text2, this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
save() {
|
|
587
|
-
__classPrivateFieldGet$
|
|
587
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").save();
|
|
588
588
|
}
|
|
589
589
|
restore() {
|
|
590
|
-
__classPrivateFieldGet$
|
|
590
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").restore();
|
|
591
591
|
}
|
|
592
592
|
scale(ratioX, ratioY) {
|
|
593
|
-
__classPrivateFieldGet$
|
|
593
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").scale(ratioX, ratioY);
|
|
594
594
|
}
|
|
595
595
|
circle(x2, y2, radiusX, radiusY, rotation, startAngle, endAngle, counterclockwise) {
|
|
596
|
-
__classPrivateFieldGet$
|
|
596
|
+
__classPrivateFieldGet$9(this, _Context2D_ctx, "f").ellipse(this.$doPixelRatio(x2), this.$doPixelRatio(y2), this.$doPixelRatio(radiusX), this.$doPixelRatio(radiusY), rotation, startAngle, endAngle, counterclockwise);
|
|
597
597
|
}
|
|
598
598
|
isPointInPath(x2, y2) {
|
|
599
|
-
return __classPrivateFieldGet$
|
|
599
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").isPointInPath(this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
600
600
|
}
|
|
601
601
|
clip(...args) {
|
|
602
|
-
return __classPrivateFieldGet$
|
|
602
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").clip(...args);
|
|
603
603
|
}
|
|
604
604
|
setTransform(a, b, c, d, e, f) {
|
|
605
|
-
return __classPrivateFieldGet$
|
|
605
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").setTransform(a, b, c, d, e, f);
|
|
606
606
|
}
|
|
607
607
|
getTransform() {
|
|
608
|
-
return __classPrivateFieldGet$
|
|
608
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").getTransform();
|
|
609
609
|
}
|
|
610
610
|
createLinearGradient(x0, y0, x1, y1) {
|
|
611
|
-
return __classPrivateFieldGet$
|
|
611
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").createLinearGradient(this.$doPixelRatio(x0), this.$doPixelRatio(y0), this.$doPixelRatio(x1), this.$doPixelRatio(y1));
|
|
612
612
|
}
|
|
613
613
|
createRadialGradient(x0, y0, r0, x1, y1, r1) {
|
|
614
|
-
return __classPrivateFieldGet$
|
|
614
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").createRadialGradient(this.$doPixelRatio(x0), this.$doPixelRatio(y0), this.$doPixelRatio(r0), this.$doPixelRatio(x1), this.$doPixelRatio(y1), this.$doPixelRatio(r1));
|
|
615
615
|
}
|
|
616
616
|
createConicGradient(startAngle, x2, y2) {
|
|
617
|
-
return __classPrivateFieldGet$
|
|
617
|
+
return __classPrivateFieldGet$9(this, _Context2D_ctx, "f").createConicGradient(startAngle, this.$doPixelRatio(x2), this.$doPixelRatio(y2));
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
620
|
_Context2D_ctx = /* @__PURE__ */ new WeakMap(), _Context2D_opts = /* @__PURE__ */ new WeakMap();
|
|
@@ -697,7 +697,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
697
697
|
return content;
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
var __classPrivateFieldSet$
|
|
700
|
+
var __classPrivateFieldSet$8 = function(receiver, state, value, kind, f) {
|
|
701
701
|
if (kind === "m")
|
|
702
702
|
throw new TypeError("Private method is not writable");
|
|
703
703
|
if (kind === "a" && !f)
|
|
@@ -706,7 +706,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
706
706
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
707
707
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
708
708
|
};
|
|
709
|
-
var __classPrivateFieldGet$
|
|
709
|
+
var __classPrivateFieldGet$8 = function(receiver, state, kind, f) {
|
|
710
710
|
if (kind === "a" && !f)
|
|
711
711
|
throw new TypeError("Private accessor was defined without a getter");
|
|
712
712
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -717,20 +717,20 @@ var __privateMethod = (obj, member, method) => {
|
|
|
717
717
|
class EventEmitter {
|
|
718
718
|
constructor() {
|
|
719
719
|
_EventEmitter_listeners.set(this, void 0);
|
|
720
|
-
__classPrivateFieldSet$
|
|
720
|
+
__classPrivateFieldSet$8(this, _EventEmitter_listeners, /* @__PURE__ */ new Map(), "f");
|
|
721
721
|
}
|
|
722
722
|
on(eventKey, callback) {
|
|
723
|
-
if (__classPrivateFieldGet$
|
|
724
|
-
const callbacks = __classPrivateFieldGet$
|
|
723
|
+
if (__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").has(eventKey)) {
|
|
724
|
+
const callbacks = __classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").get(eventKey) || [];
|
|
725
725
|
callbacks === null || callbacks === void 0 ? void 0 : callbacks.push(callback);
|
|
726
|
-
__classPrivateFieldGet$
|
|
726
|
+
__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").set(eventKey, callbacks);
|
|
727
727
|
} else {
|
|
728
|
-
__classPrivateFieldGet$
|
|
728
|
+
__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").set(eventKey, [callback]);
|
|
729
729
|
}
|
|
730
730
|
}
|
|
731
731
|
off(eventKey, callback) {
|
|
732
|
-
if (__classPrivateFieldGet$
|
|
733
|
-
const callbacks = __classPrivateFieldGet$
|
|
732
|
+
if (__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").has(eventKey)) {
|
|
733
|
+
const callbacks = __classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").get(eventKey);
|
|
734
734
|
if (Array.isArray(callbacks)) {
|
|
735
735
|
for (let i = 0; i < (callbacks === null || callbacks === void 0 ? void 0 : callbacks.length); i++) {
|
|
736
736
|
if (callbacks[i] === callback) {
|
|
@@ -739,11 +739,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
741
|
}
|
|
742
|
-
__classPrivateFieldGet$
|
|
742
|
+
__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").set(eventKey, callbacks || []);
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
trigger(eventKey, e) {
|
|
746
|
-
const callbacks = __classPrivateFieldGet$
|
|
746
|
+
const callbacks = __classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").get(eventKey);
|
|
747
747
|
if (Array.isArray(callbacks)) {
|
|
748
748
|
callbacks.forEach((cb) => {
|
|
749
749
|
cb(e);
|
|
@@ -754,8 +754,8 @@ var __privateMethod = (obj, member, method) => {
|
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
756
|
has(name) {
|
|
757
|
-
if (__classPrivateFieldGet$
|
|
758
|
-
const list = __classPrivateFieldGet$
|
|
757
|
+
if (__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").has(name)) {
|
|
758
|
+
const list = __classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").get(name);
|
|
759
759
|
if (Array.isArray(list) && list.length > 0) {
|
|
760
760
|
return true;
|
|
761
761
|
}
|
|
@@ -763,7 +763,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
763
763
|
return false;
|
|
764
764
|
}
|
|
765
765
|
destroy() {
|
|
766
|
-
__classPrivateFieldGet$
|
|
766
|
+
__classPrivateFieldGet$8(this, _EventEmitter_listeners, "f").clear();
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
769
|
_EventEmitter_listeners = /* @__PURE__ */ new WeakMap();
|
|
@@ -777,7 +777,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
777
777
|
y: p1.y + (p2.y - p1.y) / 2
|
|
778
778
|
};
|
|
779
779
|
}
|
|
780
|
-
var __classPrivateFieldSet$
|
|
780
|
+
var __classPrivateFieldSet$7 = function(receiver, state, value, kind, f) {
|
|
781
781
|
if (kind === "m")
|
|
782
782
|
throw new TypeError("Private method is not writable");
|
|
783
783
|
if (kind === "a" && !f)
|
|
@@ -786,7 +786,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
786
786
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
787
787
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
788
788
|
};
|
|
789
|
-
var __classPrivateFieldGet$
|
|
789
|
+
var __classPrivateFieldGet$7 = function(receiver, state, kind, f) {
|
|
790
790
|
if (kind === "a" && !f)
|
|
791
791
|
throw new TypeError("Private accessor was defined without a getter");
|
|
792
792
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -799,27 +799,27 @@ var __privateMethod = (obj, member, method) => {
|
|
|
799
799
|
_Store_instances.add(this);
|
|
800
800
|
_Store_temp.set(this, void 0);
|
|
801
801
|
_Store_backUpDefaultStorage.set(this, void 0);
|
|
802
|
-
__classPrivateFieldSet$
|
|
803
|
-
__classPrivateFieldSet$
|
|
802
|
+
__classPrivateFieldSet$7(this, _Store_backUpDefaultStorage, deepClone(opts.defaultStorage), "f");
|
|
803
|
+
__classPrivateFieldSet$7(this, _Store_temp, __classPrivateFieldGet$7(this, _Store_instances, "m", _Store_createTempStorage).call(this), "f");
|
|
804
804
|
}
|
|
805
805
|
set(name, value) {
|
|
806
|
-
__classPrivateFieldGet$
|
|
806
|
+
__classPrivateFieldGet$7(this, _Store_temp, "f")[name] = value;
|
|
807
807
|
}
|
|
808
808
|
get(name) {
|
|
809
|
-
return __classPrivateFieldGet$
|
|
809
|
+
return __classPrivateFieldGet$7(this, _Store_temp, "f")[name];
|
|
810
810
|
}
|
|
811
811
|
getSnapshot() {
|
|
812
|
-
return deepClone(__classPrivateFieldGet$
|
|
812
|
+
return deepClone(__classPrivateFieldGet$7(this, _Store_temp, "f"));
|
|
813
813
|
}
|
|
814
814
|
clear() {
|
|
815
|
-
__classPrivateFieldSet$
|
|
815
|
+
__classPrivateFieldSet$7(this, _Store_temp, __classPrivateFieldGet$7(this, _Store_instances, "m", _Store_createTempStorage).call(this), "f");
|
|
816
816
|
}
|
|
817
817
|
destroy() {
|
|
818
|
-
__classPrivateFieldSet$
|
|
818
|
+
__classPrivateFieldSet$7(this, _Store_temp, null, "f");
|
|
819
819
|
}
|
|
820
820
|
}
|
|
821
821
|
_Store_temp = /* @__PURE__ */ new WeakMap(), _Store_backUpDefaultStorage = /* @__PURE__ */ new WeakMap(), _Store_instances = /* @__PURE__ */ new WeakSet(), _Store_createTempStorage = function _Store_createTempStorage2() {
|
|
822
|
-
return deepClone(__classPrivateFieldGet$
|
|
822
|
+
return deepClone(__classPrivateFieldGet$7(this, _Store_backUpDefaultStorage, "f"));
|
|
823
823
|
};
|
|
824
824
|
function getViewScaleInfoFromSnapshot(snapshot) {
|
|
825
825
|
const { activeStore } = snapshot;
|
|
@@ -2471,6 +2471,28 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
|
+
function drawUnderlay(ctx, underlay, opts) {
|
|
2475
|
+
const { calculator, viewScaleInfo, viewSizeInfo, parentOpacity } = opts;
|
|
2476
|
+
const elem = Object.assign({ uuid: "underlay" }, underlay);
|
|
2477
|
+
const { x: x2, y: y2, w: w2, h: h2 } = (calculator === null || calculator === void 0 ? void 0 : calculator.elementSize(elem, viewScaleInfo, viewSizeInfo)) || elem;
|
|
2478
|
+
const angle2 = 0;
|
|
2479
|
+
const viewElem = Object.assign(Object.assign({}, elem), { x: x2, y: y2, w: w2, h: h2, angle: angle2 });
|
|
2480
|
+
drawBoxShadow(ctx, viewElem, {
|
|
2481
|
+
viewScaleInfo,
|
|
2482
|
+
viewSizeInfo,
|
|
2483
|
+
renderContent: () => {
|
|
2484
|
+
drawBox(ctx, viewElem, {
|
|
2485
|
+
originElem: elem,
|
|
2486
|
+
calcElemSize: { x: x2, y: y2, w: w2, h: h2, angle: angle2 },
|
|
2487
|
+
viewScaleInfo,
|
|
2488
|
+
viewSizeInfo,
|
|
2489
|
+
parentOpacity,
|
|
2490
|
+
renderContent: () => {
|
|
2491
|
+
}
|
|
2492
|
+
});
|
|
2493
|
+
}
|
|
2494
|
+
});
|
|
2495
|
+
}
|
|
2474
2496
|
var __awaiter = function(thisArg, _arguments, P, generator) {
|
|
2475
2497
|
function adopt(value) {
|
|
2476
2498
|
return value instanceof P ? value : new P(function(resolve) {
|
|
@@ -2498,14 +2520,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2498
2520
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2499
2521
|
});
|
|
2500
2522
|
};
|
|
2501
|
-
var __classPrivateFieldGet$
|
|
2523
|
+
var __classPrivateFieldGet$6 = function(receiver, state, kind, f) {
|
|
2502
2524
|
if (kind === "a" && !f)
|
|
2503
2525
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2504
2526
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
2505
2527
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
2506
2528
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
2507
2529
|
};
|
|
2508
|
-
var __classPrivateFieldSet$
|
|
2530
|
+
var __classPrivateFieldSet$6 = function(receiver, state, value, kind, f) {
|
|
2509
2531
|
if (kind === "m")
|
|
2510
2532
|
throw new TypeError("Private method is not writable");
|
|
2511
2533
|
if (kind === "a" && !f)
|
|
@@ -2541,7 +2563,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2541
2563
|
_Loader_loadFuncMap.set(this, {});
|
|
2542
2564
|
_Loader_currentLoadItemMap.set(this, {});
|
|
2543
2565
|
_Loader_storageLoadItemMap.set(this, {});
|
|
2544
|
-
__classPrivateFieldGet$
|
|
2566
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_registerLoadFunc).call(this, "image", (elem, assets) => __awaiter(this, void 0, void 0, function* () {
|
|
2545
2567
|
var _a;
|
|
2546
2568
|
const src = ((_a = assets[elem.detail.src]) === null || _a === void 0 ? void 0 : _a.value) || elem.detail.src;
|
|
2547
2569
|
const content = yield loadImage(src);
|
|
@@ -2551,7 +2573,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2551
2573
|
content
|
|
2552
2574
|
};
|
|
2553
2575
|
}));
|
|
2554
|
-
__classPrivateFieldGet$
|
|
2576
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_registerLoadFunc).call(this, "html", (elem, assets) => __awaiter(this, void 0, void 0, function* () {
|
|
2555
2577
|
var _b;
|
|
2556
2578
|
const html2 = ((_b = assets[elem.detail.html]) === null || _b === void 0 ? void 0 : _b.value) || elem.detail.html;
|
|
2557
2579
|
const content = yield loadHTML(html2, {
|
|
@@ -2564,7 +2586,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2564
2586
|
content
|
|
2565
2587
|
};
|
|
2566
2588
|
}));
|
|
2567
|
-
__classPrivateFieldGet$
|
|
2589
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_registerLoadFunc).call(this, "svg", (elem, assets) => __awaiter(this, void 0, void 0, function* () {
|
|
2568
2590
|
var _c;
|
|
2569
2591
|
const svg2 = ((_c = assets[elem.detail.svg]) === null || _c === void 0 ? void 0 : _c.value) || elem.detail.svg;
|
|
2570
2592
|
const content = yield loadSVG(svg2);
|
|
@@ -2576,32 +2598,32 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2576
2598
|
}));
|
|
2577
2599
|
}
|
|
2578
2600
|
destroy() {
|
|
2579
|
-
__classPrivateFieldSet$
|
|
2580
|
-
__classPrivateFieldSet$
|
|
2581
|
-
__classPrivateFieldSet$
|
|
2601
|
+
__classPrivateFieldSet$6(this, _Loader_loadFuncMap, null, "f");
|
|
2602
|
+
__classPrivateFieldSet$6(this, _Loader_currentLoadItemMap, null, "f");
|
|
2603
|
+
__classPrivateFieldSet$6(this, _Loader_storageLoadItemMap, null, "f");
|
|
2582
2604
|
}
|
|
2583
2605
|
load(element, assets) {
|
|
2584
|
-
if (__classPrivateFieldGet$
|
|
2606
|
+
if (__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_isExistingErrorStorage).call(this, element)) {
|
|
2585
2607
|
return;
|
|
2586
2608
|
}
|
|
2587
2609
|
if (supportElementTypes.includes(element.type)) {
|
|
2588
|
-
__classPrivateFieldGet$
|
|
2610
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_loadResource).call(this, element, assets);
|
|
2589
2611
|
}
|
|
2590
2612
|
}
|
|
2591
2613
|
getContent(element) {
|
|
2592
2614
|
var _a, _b;
|
|
2593
2615
|
const assetId = getAssetIdFromElement(element);
|
|
2594
|
-
return ((_b = (_a = __classPrivateFieldGet$
|
|
2616
|
+
return ((_b = (_a = __classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")) === null || _a === void 0 ? void 0 : _a[assetId]) === null || _b === void 0 ? void 0 : _b.content) || null;
|
|
2595
2617
|
}
|
|
2596
2618
|
getLoadItemMap() {
|
|
2597
|
-
return __classPrivateFieldGet$
|
|
2619
|
+
return __classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f");
|
|
2598
2620
|
}
|
|
2599
2621
|
setLoadItemMap(itemMap) {
|
|
2600
|
-
__classPrivateFieldSet$
|
|
2622
|
+
__classPrivateFieldSet$6(this, _Loader_storageLoadItemMap, itemMap, "f");
|
|
2601
2623
|
}
|
|
2602
2624
|
}
|
|
2603
2625
|
_Loader_loadFuncMap = /* @__PURE__ */ new WeakMap(), _Loader_currentLoadItemMap = /* @__PURE__ */ new WeakMap(), _Loader_storageLoadItemMap = /* @__PURE__ */ new WeakMap(), _Loader_instances = /* @__PURE__ */ new WeakSet(), _Loader_registerLoadFunc = function _Loader_registerLoadFunc2(type, func) {
|
|
2604
|
-
__classPrivateFieldGet$
|
|
2626
|
+
__classPrivateFieldGet$6(this, _Loader_loadFuncMap, "f")[type] = func;
|
|
2605
2627
|
}, _Loader_getLoadElementSource = function _Loader_getLoadElementSource2(element) {
|
|
2606
2628
|
var _a, _b, _c;
|
|
2607
2629
|
let source = null;
|
|
@@ -2621,62 +2643,62 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2621
2643
|
error: null,
|
|
2622
2644
|
startTime: -1,
|
|
2623
2645
|
endTime: -1,
|
|
2624
|
-
source: __classPrivateFieldGet$
|
|
2646
|
+
source: __classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_getLoadElementSource).call(this, element)
|
|
2625
2647
|
};
|
|
2626
2648
|
}, _Loader_emitLoad = function _Loader_emitLoad2(item) {
|
|
2627
2649
|
const assetId = getAssetIdFromElement(item.element);
|
|
2628
|
-
const storageItem = __classPrivateFieldGet$
|
|
2650
|
+
const storageItem = __classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId];
|
|
2629
2651
|
if (storageItem) {
|
|
2630
2652
|
if (storageItem.startTime < item.startTime) {
|
|
2631
|
-
__classPrivateFieldGet$
|
|
2653
|
+
__classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId] = item;
|
|
2632
2654
|
this.trigger("load", Object.assign(Object.assign({}, item), { countTime: item.endTime - item.startTime }));
|
|
2633
2655
|
}
|
|
2634
2656
|
} else {
|
|
2635
|
-
__classPrivateFieldGet$
|
|
2657
|
+
__classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId] = item;
|
|
2636
2658
|
this.trigger("load", Object.assign(Object.assign({}, item), { countTime: item.endTime - item.startTime }));
|
|
2637
2659
|
}
|
|
2638
2660
|
}, _Loader_emitError = function _Loader_emitError2(item) {
|
|
2639
2661
|
const assetId = getAssetIdFromElement(item.element);
|
|
2640
|
-
const storageItem = __classPrivateFieldGet$
|
|
2662
|
+
const storageItem = __classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId];
|
|
2641
2663
|
if (storageItem) {
|
|
2642
2664
|
if (storageItem.startTime < item.startTime) {
|
|
2643
|
-
__classPrivateFieldGet$
|
|
2665
|
+
__classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId] = item;
|
|
2644
2666
|
this.trigger("error", Object.assign(Object.assign({}, item), { countTime: item.endTime - item.startTime }));
|
|
2645
2667
|
}
|
|
2646
2668
|
} else {
|
|
2647
|
-
__classPrivateFieldGet$
|
|
2669
|
+
__classPrivateFieldGet$6(this, _Loader_storageLoadItemMap, "f")[assetId] = item;
|
|
2648
2670
|
this.trigger("error", Object.assign(Object.assign({}, item), { countTime: item.endTime - item.startTime }));
|
|
2649
2671
|
}
|
|
2650
2672
|
}, _Loader_loadResource = function _Loader_loadResource2(element, assets) {
|
|
2651
|
-
const item = __classPrivateFieldGet$
|
|
2673
|
+
const item = __classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_createLoadItem).call(this, element);
|
|
2652
2674
|
const assetId = getAssetIdFromElement(element);
|
|
2653
|
-
__classPrivateFieldGet$
|
|
2654
|
-
const loadFunc = __classPrivateFieldGet$
|
|
2675
|
+
__classPrivateFieldGet$6(this, _Loader_currentLoadItemMap, "f")[assetId] = item;
|
|
2676
|
+
const loadFunc = __classPrivateFieldGet$6(this, _Loader_loadFuncMap, "f")[element.type];
|
|
2655
2677
|
if (typeof loadFunc === "function") {
|
|
2656
2678
|
item.startTime = Date.now();
|
|
2657
2679
|
loadFunc(element, assets).then((result) => {
|
|
2658
2680
|
item.content = result.content;
|
|
2659
2681
|
item.endTime = Date.now();
|
|
2660
2682
|
item.status = "load";
|
|
2661
|
-
__classPrivateFieldGet$
|
|
2683
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_emitLoad).call(this, item);
|
|
2662
2684
|
}).catch((err) => {
|
|
2663
2685
|
console.warn(`Load element source "${item.source}" fail`, err, element);
|
|
2664
2686
|
item.endTime = Date.now();
|
|
2665
2687
|
item.status = "error";
|
|
2666
2688
|
item.error = err;
|
|
2667
|
-
__classPrivateFieldGet$
|
|
2689
|
+
__classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_emitError).call(this, item);
|
|
2668
2690
|
});
|
|
2669
2691
|
}
|
|
2670
2692
|
}, _Loader_isExistingErrorStorage = function _Loader_isExistingErrorStorage2(element) {
|
|
2671
2693
|
var _a;
|
|
2672
2694
|
const assetId = getAssetIdFromElement(element);
|
|
2673
|
-
const existItem = (_a = __classPrivateFieldGet$
|
|
2674
|
-
if (existItem && existItem.status === "error" && existItem.source && existItem.source === __classPrivateFieldGet$
|
|
2695
|
+
const existItem = (_a = __classPrivateFieldGet$6(this, _Loader_currentLoadItemMap, "f")) === null || _a === void 0 ? void 0 : _a[assetId];
|
|
2696
|
+
if (existItem && existItem.status === "error" && existItem.source && existItem.source === __classPrivateFieldGet$6(this, _Loader_instances, "m", _Loader_getLoadElementSource).call(this, element)) {
|
|
2675
2697
|
return true;
|
|
2676
2698
|
}
|
|
2677
2699
|
return false;
|
|
2678
2700
|
};
|
|
2679
|
-
var __classPrivateFieldSet$
|
|
2701
|
+
var __classPrivateFieldSet$5 = function(receiver, state, value, kind, f) {
|
|
2680
2702
|
if (kind === "m")
|
|
2681
2703
|
throw new TypeError("Private method is not writable");
|
|
2682
2704
|
if (kind === "a" && !f)
|
|
@@ -2685,7 +2707,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2685
2707
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2686
2708
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
2687
2709
|
};
|
|
2688
|
-
var __classPrivateFieldGet$
|
|
2710
|
+
var __classPrivateFieldGet$5 = function(receiver, state, kind, f) {
|
|
2689
2711
|
if (kind === "a" && !f)
|
|
2690
2712
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2691
2713
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -2699,21 +2721,21 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2699
2721
|
_Renderer_instances.add(this);
|
|
2700
2722
|
_Renderer_opts.set(this, void 0);
|
|
2701
2723
|
_Renderer_loader.set(this, new Loader());
|
|
2702
|
-
__classPrivateFieldSet$
|
|
2703
|
-
__classPrivateFieldGet$
|
|
2724
|
+
__classPrivateFieldSet$5(this, _Renderer_opts, opts, "f");
|
|
2725
|
+
__classPrivateFieldGet$5(this, _Renderer_instances, "m", _Renderer_init).call(this);
|
|
2704
2726
|
}
|
|
2705
2727
|
destroy() {
|
|
2706
|
-
__classPrivateFieldSet$
|
|
2707
|
-
__classPrivateFieldGet$
|
|
2708
|
-
__classPrivateFieldSet$
|
|
2728
|
+
__classPrivateFieldSet$5(this, _Renderer_opts, null, "f");
|
|
2729
|
+
__classPrivateFieldGet$5(this, _Renderer_loader, "f").destroy();
|
|
2730
|
+
__classPrivateFieldSet$5(this, _Renderer_loader, null, "f");
|
|
2709
2731
|
}
|
|
2710
2732
|
updateOptions(opts) {
|
|
2711
|
-
__classPrivateFieldSet$
|
|
2733
|
+
__classPrivateFieldSet$5(this, _Renderer_opts, opts, "f");
|
|
2712
2734
|
}
|
|
2713
2735
|
drawData(data, opts) {
|
|
2714
|
-
const loader = __classPrivateFieldGet$
|
|
2715
|
-
const { calculator } = __classPrivateFieldGet$
|
|
2716
|
-
const viewContext = __classPrivateFieldGet$
|
|
2736
|
+
const loader = __classPrivateFieldGet$5(this, _Renderer_loader, "f");
|
|
2737
|
+
const { calculator } = __classPrivateFieldGet$5(this, _Renderer_opts, "f");
|
|
2738
|
+
const viewContext = __classPrivateFieldGet$5(this, _Renderer_opts, "f").viewContext;
|
|
2717
2739
|
viewContext.clearRect(0, 0, viewContext.canvas.width, viewContext.canvas.height);
|
|
2718
2740
|
const parentElementSize = {
|
|
2719
2741
|
x: 0,
|
|
@@ -2721,6 +2743,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2721
2743
|
w: opts.viewSizeInfo.width,
|
|
2722
2744
|
h: opts.viewSizeInfo.height
|
|
2723
2745
|
};
|
|
2746
|
+
if (data.underlay) {
|
|
2747
|
+
drawUnderlay(viewContext, data.underlay, Object.assign({
|
|
2748
|
+
loader,
|
|
2749
|
+
calculator,
|
|
2750
|
+
parentElementSize,
|
|
2751
|
+
parentOpacity: 1
|
|
2752
|
+
}, opts));
|
|
2753
|
+
}
|
|
2724
2754
|
drawElementList(viewContext, data, Object.assign({
|
|
2725
2755
|
loader,
|
|
2726
2756
|
calculator,
|
|
@@ -2730,7 +2760,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2730
2760
|
}, opts));
|
|
2731
2761
|
}
|
|
2732
2762
|
scale(num) {
|
|
2733
|
-
const { sharer } = __classPrivateFieldGet$
|
|
2763
|
+
const { sharer } = __classPrivateFieldGet$5(this, _Renderer_opts, "f");
|
|
2734
2764
|
if (!sharer) {
|
|
2735
2765
|
return;
|
|
2736
2766
|
}
|
|
@@ -2755,21 +2785,24 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2755
2785
|
}
|
|
2756
2786
|
}
|
|
2757
2787
|
setLoadItemMap(itemMap) {
|
|
2758
|
-
__classPrivateFieldGet$
|
|
2788
|
+
__classPrivateFieldGet$5(this, _Renderer_loader, "f").setLoadItemMap(itemMap);
|
|
2759
2789
|
}
|
|
2760
2790
|
getLoadItemMap() {
|
|
2761
|
-
return __classPrivateFieldGet$
|
|
2791
|
+
return __classPrivateFieldGet$5(this, _Renderer_loader, "f").getLoadItemMap();
|
|
2792
|
+
}
|
|
2793
|
+
getLoader() {
|
|
2794
|
+
return __classPrivateFieldGet$5(this, _Renderer_loader, "f");
|
|
2762
2795
|
}
|
|
2763
2796
|
}
|
|
2764
2797
|
_Renderer_opts = /* @__PURE__ */ new WeakMap(), _Renderer_loader = /* @__PURE__ */ new WeakMap(), _Renderer_instances = /* @__PURE__ */ new WeakSet(), _Renderer_init = function _Renderer_init2() {
|
|
2765
|
-
const loader = __classPrivateFieldGet$
|
|
2798
|
+
const loader = __classPrivateFieldGet$5(this, _Renderer_loader, "f");
|
|
2766
2799
|
loader.on("load", (e) => {
|
|
2767
2800
|
this.trigger("load", e);
|
|
2768
2801
|
});
|
|
2769
2802
|
loader.on("error", () => {
|
|
2770
2803
|
});
|
|
2771
2804
|
};
|
|
2772
|
-
var __classPrivateFieldSet$
|
|
2805
|
+
var __classPrivateFieldSet$4 = function(receiver, state, value, kind, f) {
|
|
2773
2806
|
if (kind === "m")
|
|
2774
2807
|
throw new TypeError("Private method is not writable");
|
|
2775
2808
|
if (kind === "a" && !f)
|
|
@@ -2778,7 +2811,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2778
2811
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2779
2812
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
2780
2813
|
};
|
|
2781
|
-
var __classPrivateFieldGet$
|
|
2814
|
+
var __classPrivateFieldGet$4 = function(receiver, state, kind, f) {
|
|
2782
2815
|
if (kind === "a" && !f)
|
|
2783
2816
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2784
2817
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -2789,10 +2822,10 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2789
2822
|
class Calculator {
|
|
2790
2823
|
constructor(opts) {
|
|
2791
2824
|
_Calculator_opts.set(this, void 0);
|
|
2792
|
-
__classPrivateFieldSet$
|
|
2825
|
+
__classPrivateFieldSet$4(this, _Calculator_opts, opts, "f");
|
|
2793
2826
|
}
|
|
2794
2827
|
destroy() {
|
|
2795
|
-
__classPrivateFieldSet$
|
|
2828
|
+
__classPrivateFieldSet$4(this, _Calculator_opts, null, "f");
|
|
2796
2829
|
}
|
|
2797
2830
|
elementSize(size, viewScaleInfo, viewSizeInfo) {
|
|
2798
2831
|
return calcViewElementSize(size, { viewScaleInfo, viewSizeInfo });
|
|
@@ -2801,7 +2834,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2801
2834
|
return isElementInView(elem, { viewScaleInfo, viewSizeInfo });
|
|
2802
2835
|
}
|
|
2803
2836
|
isPointInElement(p, elem, viewScaleInfo, viewSizeInfo) {
|
|
2804
|
-
const context2d = __classPrivateFieldGet$
|
|
2837
|
+
const context2d = __classPrivateFieldGet$4(this, _Calculator_opts, "f").viewContext;
|
|
2805
2838
|
return isViewPointInElement(p, {
|
|
2806
2839
|
context2d,
|
|
2807
2840
|
element: elem,
|
|
@@ -2810,12 +2843,12 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2810
2843
|
});
|
|
2811
2844
|
}
|
|
2812
2845
|
getPointElement(p, opts) {
|
|
2813
|
-
const context2d = __classPrivateFieldGet$
|
|
2846
|
+
const context2d = __classPrivateFieldGet$4(this, _Calculator_opts, "f").viewContext;
|
|
2814
2847
|
return getViewPointAtElement(p, Object.assign(Object.assign({}, opts), { context2d }));
|
|
2815
2848
|
}
|
|
2816
2849
|
}
|
|
2817
2850
|
_Calculator_opts = /* @__PURE__ */ new WeakMap();
|
|
2818
|
-
var __classPrivateFieldSet$
|
|
2851
|
+
var __classPrivateFieldSet$3 = function(receiver, state, value, kind, f) {
|
|
2819
2852
|
if (kind === "m")
|
|
2820
2853
|
throw new TypeError("Private method is not writable");
|
|
2821
2854
|
if (kind === "a" && !f)
|
|
@@ -2824,7 +2857,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2824
2857
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
2825
2858
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
2826
2859
|
};
|
|
2827
|
-
var __classPrivateFieldGet$
|
|
2860
|
+
var __classPrivateFieldGet$3 = function(receiver, state, kind, f) {
|
|
2828
2861
|
if (kind === "a" && !f)
|
|
2829
2862
|
throw new TypeError("Private accessor was defined without a getter");
|
|
2830
2863
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -2842,11 +2875,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2842
2875
|
_BoardWatcher_opts.set(this, void 0);
|
|
2843
2876
|
_BoardWatcher_store.set(this, void 0);
|
|
2844
2877
|
_BoardWatcher_onWheel.set(this, (e) => {
|
|
2845
|
-
if (!__classPrivateFieldGet$
|
|
2878
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2846
2879
|
return;
|
|
2847
2880
|
}
|
|
2848
|
-
const point = __classPrivateFieldGet$
|
|
2849
|
-
if (!__classPrivateFieldGet$
|
|
2881
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2882
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2850
2883
|
return;
|
|
2851
2884
|
}
|
|
2852
2885
|
e.preventDefault();
|
|
@@ -2860,125 +2893,125 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2860
2893
|
}
|
|
2861
2894
|
});
|
|
2862
2895
|
_BoardWatcher_onContextMenu.set(this, (e) => {
|
|
2863
|
-
if (!__classPrivateFieldGet$
|
|
2896
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2864
2897
|
return;
|
|
2865
2898
|
}
|
|
2866
2899
|
e.preventDefault();
|
|
2867
|
-
const point = __classPrivateFieldGet$
|
|
2868
|
-
if (!__classPrivateFieldGet$
|
|
2900
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2901
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2869
2902
|
return;
|
|
2870
2903
|
}
|
|
2871
2904
|
});
|
|
2872
2905
|
_BoardWatcher_onClick.set(this, (e) => {
|
|
2873
|
-
if (!__classPrivateFieldGet$
|
|
2906
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2874
2907
|
return;
|
|
2875
2908
|
}
|
|
2876
2909
|
e.preventDefault();
|
|
2877
|
-
const point = __classPrivateFieldGet$
|
|
2878
|
-
if (!__classPrivateFieldGet$
|
|
2910
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2911
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2879
2912
|
return;
|
|
2880
2913
|
}
|
|
2881
2914
|
const maxLimitTime = 500;
|
|
2882
2915
|
const t = Date.now();
|
|
2883
|
-
const preClickPoint = __classPrivateFieldGet$
|
|
2916
|
+
const preClickPoint = __classPrivateFieldGet$3(this, _BoardWatcher_store, "f").get("prevClickPoint");
|
|
2884
2917
|
if (preClickPoint && t - preClickPoint.t <= maxLimitTime && Math.abs(preClickPoint.x - point.x) <= 5 && Math.abs(preClickPoint.y - point.y) <= 5) {
|
|
2885
2918
|
this.trigger("doubleClick", { point });
|
|
2886
2919
|
} else {
|
|
2887
|
-
__classPrivateFieldGet$
|
|
2920
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").set("prevClickPoint", point);
|
|
2888
2921
|
}
|
|
2889
2922
|
});
|
|
2890
2923
|
_BoardWatcher_onPointLeave.set(this, (e) => {
|
|
2891
|
-
__classPrivateFieldGet$
|
|
2892
|
-
if (!__classPrivateFieldGet$
|
|
2924
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").set("hasPointDown", false);
|
|
2925
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2893
2926
|
return;
|
|
2894
2927
|
}
|
|
2895
2928
|
e.preventDefault();
|
|
2896
|
-
const point = __classPrivateFieldGet$
|
|
2929
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2897
2930
|
this.trigger("pointLeave", { point });
|
|
2898
2931
|
});
|
|
2899
2932
|
_BoardWatcher_onPointEnd.set(this, (e) => {
|
|
2900
|
-
__classPrivateFieldGet$
|
|
2901
|
-
if (!__classPrivateFieldGet$
|
|
2933
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").set("hasPointDown", false);
|
|
2934
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2902
2935
|
return;
|
|
2903
2936
|
}
|
|
2904
2937
|
e.preventDefault();
|
|
2905
|
-
const point = __classPrivateFieldGet$
|
|
2938
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2906
2939
|
this.trigger("pointEnd", { point });
|
|
2907
2940
|
});
|
|
2908
2941
|
_BoardWatcher_onPointMove.set(this, (e) => {
|
|
2909
|
-
if (!__classPrivateFieldGet$
|
|
2942
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2910
2943
|
return;
|
|
2911
2944
|
}
|
|
2912
2945
|
e.preventDefault();
|
|
2913
2946
|
e.stopPropagation();
|
|
2914
|
-
const point = __classPrivateFieldGet$
|
|
2915
|
-
if (!__classPrivateFieldGet$
|
|
2916
|
-
if (__classPrivateFieldGet$
|
|
2947
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2948
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2949
|
+
if (__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").get("hasPointDown")) {
|
|
2917
2950
|
this.trigger("pointLeave", { point });
|
|
2918
|
-
__classPrivateFieldGet$
|
|
2951
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").set("hasPointDown", false);
|
|
2919
2952
|
}
|
|
2920
2953
|
return;
|
|
2921
2954
|
}
|
|
2922
|
-
if (__classPrivateFieldGet$
|
|
2955
|
+
if (__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").get("hasPointDown") !== true) {
|
|
2923
2956
|
return;
|
|
2924
2957
|
}
|
|
2925
2958
|
this.trigger("pointMove", { point });
|
|
2926
2959
|
});
|
|
2927
2960
|
_BoardWatcher_onPointStart.set(this, (e) => {
|
|
2928
|
-
if (!__classPrivateFieldGet$
|
|
2961
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2929
2962
|
return;
|
|
2930
2963
|
}
|
|
2931
2964
|
e.preventDefault();
|
|
2932
|
-
const point = __classPrivateFieldGet$
|
|
2933
|
-
if (!__classPrivateFieldGet$
|
|
2965
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2966
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2934
2967
|
return;
|
|
2935
2968
|
}
|
|
2936
|
-
__classPrivateFieldGet$
|
|
2969
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_store, "f").set("hasPointDown", true);
|
|
2937
2970
|
this.trigger("pointStart", { point });
|
|
2938
2971
|
});
|
|
2939
2972
|
_BoardWatcher_onHover.set(this, (e) => {
|
|
2940
|
-
if (!__classPrivateFieldGet$
|
|
2973
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isInTarget).call(this, e)) {
|
|
2941
2974
|
return;
|
|
2942
2975
|
}
|
|
2943
2976
|
e.preventDefault();
|
|
2944
|
-
const point = __classPrivateFieldGet$
|
|
2945
|
-
if (!__classPrivateFieldGet$
|
|
2977
|
+
const point = __classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_getPoint).call(this, e);
|
|
2978
|
+
if (!__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_isVaildPoint).call(this, point)) {
|
|
2946
2979
|
return;
|
|
2947
2980
|
}
|
|
2948
2981
|
this.trigger("hover", { point });
|
|
2949
2982
|
});
|
|
2950
2983
|
const store = new Store({ defaultStorage: { hasPointDown: false, prevClickPoint: null } });
|
|
2951
|
-
__classPrivateFieldSet$
|
|
2952
|
-
__classPrivateFieldSet$
|
|
2953
|
-
__classPrivateFieldGet$
|
|
2984
|
+
__classPrivateFieldSet$3(this, _BoardWatcher_store, store, "f");
|
|
2985
|
+
__classPrivateFieldSet$3(this, _BoardWatcher_opts, opts, "f");
|
|
2986
|
+
__classPrivateFieldGet$3(this, _BoardWatcher_instances, "m", _BoardWatcher_init).call(this);
|
|
2954
2987
|
}
|
|
2955
2988
|
destroy() {
|
|
2956
2989
|
const container = window;
|
|
2957
|
-
container.removeEventListener("mousemove", __classPrivateFieldGet$
|
|
2958
|
-
container.removeEventListener("mousedown", __classPrivateFieldGet$
|
|
2959
|
-
container.removeEventListener("mousemove", __classPrivateFieldGet$
|
|
2960
|
-
container.removeEventListener("mouseup", __classPrivateFieldGet$
|
|
2961
|
-
container.removeEventListener("mouseleave", __classPrivateFieldGet$
|
|
2962
|
-
container.removeEventListener("wheel", __classPrivateFieldGet$
|
|
2963
|
-
container.removeEventListener("click", __classPrivateFieldGet$
|
|
2964
|
-
container.removeEventListener("contextmenu", __classPrivateFieldGet$
|
|
2990
|
+
container.removeEventListener("mousemove", __classPrivateFieldGet$3(this, _BoardWatcher_onHover, "f"));
|
|
2991
|
+
container.removeEventListener("mousedown", __classPrivateFieldGet$3(this, _BoardWatcher_onPointStart, "f"));
|
|
2992
|
+
container.removeEventListener("mousemove", __classPrivateFieldGet$3(this, _BoardWatcher_onPointMove, "f"));
|
|
2993
|
+
container.removeEventListener("mouseup", __classPrivateFieldGet$3(this, _BoardWatcher_onPointEnd, "f"));
|
|
2994
|
+
container.removeEventListener("mouseleave", __classPrivateFieldGet$3(this, _BoardWatcher_onPointLeave, "f"));
|
|
2995
|
+
container.removeEventListener("wheel", __classPrivateFieldGet$3(this, _BoardWatcher_onWheel, "f"));
|
|
2996
|
+
container.removeEventListener("click", __classPrivateFieldGet$3(this, _BoardWatcher_onClick, "f"));
|
|
2997
|
+
container.removeEventListener("contextmenu", __classPrivateFieldGet$3(this, _BoardWatcher_onContextMenu, "f"));
|
|
2965
2998
|
this.destroy();
|
|
2966
2999
|
}
|
|
2967
3000
|
}
|
|
2968
3001
|
_BoardWatcher_opts = /* @__PURE__ */ new WeakMap(), _BoardWatcher_store = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onWheel = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onContextMenu = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onClick = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onPointLeave = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onPointEnd = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onPointMove = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onPointStart = /* @__PURE__ */ new WeakMap(), _BoardWatcher_onHover = /* @__PURE__ */ new WeakMap(), _BoardWatcher_instances = /* @__PURE__ */ new WeakSet(), _BoardWatcher_init = function _BoardWatcher_init2() {
|
|
2969
3002
|
const container = window;
|
|
2970
|
-
container.addEventListener("mousemove", __classPrivateFieldGet$
|
|
2971
|
-
container.addEventListener("mousedown", __classPrivateFieldGet$
|
|
2972
|
-
container.addEventListener("mousemove", __classPrivateFieldGet$
|
|
2973
|
-
container.addEventListener("mouseup", __classPrivateFieldGet$
|
|
2974
|
-
container.addEventListener("mouseleave", __classPrivateFieldGet$
|
|
2975
|
-
container.addEventListener("wheel", __classPrivateFieldGet$
|
|
2976
|
-
container.addEventListener("click", __classPrivateFieldGet$
|
|
2977
|
-
container.addEventListener("contextmenu", __classPrivateFieldGet$
|
|
3003
|
+
container.addEventListener("mousemove", __classPrivateFieldGet$3(this, _BoardWatcher_onHover, "f"));
|
|
3004
|
+
container.addEventListener("mousedown", __classPrivateFieldGet$3(this, _BoardWatcher_onPointStart, "f"));
|
|
3005
|
+
container.addEventListener("mousemove", __classPrivateFieldGet$3(this, _BoardWatcher_onPointMove, "f"));
|
|
3006
|
+
container.addEventListener("mouseup", __classPrivateFieldGet$3(this, _BoardWatcher_onPointEnd, "f"));
|
|
3007
|
+
container.addEventListener("mouseleave", __classPrivateFieldGet$3(this, _BoardWatcher_onPointLeave, "f"));
|
|
3008
|
+
container.addEventListener("wheel", __classPrivateFieldGet$3(this, _BoardWatcher_onWheel, "f"), { passive: false });
|
|
3009
|
+
container.addEventListener("click", __classPrivateFieldGet$3(this, _BoardWatcher_onClick, "f"));
|
|
3010
|
+
container.addEventListener("contextmenu", __classPrivateFieldGet$3(this, _BoardWatcher_onContextMenu, "f"));
|
|
2978
3011
|
}, _BoardWatcher_isInTarget = function _BoardWatcher_isInTarget2(e) {
|
|
2979
|
-
return e.target === __classPrivateFieldGet$
|
|
3012
|
+
return e.target === __classPrivateFieldGet$3(this, _BoardWatcher_opts, "f").boardContent.boardContext.canvas;
|
|
2980
3013
|
}, _BoardWatcher_getPoint = function _BoardWatcher_getPoint2(e) {
|
|
2981
|
-
const boardCanvas = __classPrivateFieldGet$
|
|
3014
|
+
const boardCanvas = __classPrivateFieldGet$3(this, _BoardWatcher_opts, "f").boardContent.boardContext.canvas;
|
|
2982
3015
|
const rect = boardCanvas.getBoundingClientRect();
|
|
2983
3016
|
const p = {
|
|
2984
3017
|
x: e.clientX - rect.left,
|
|
@@ -2987,14 +3020,14 @@ var __privateMethod = (obj, member, method) => {
|
|
|
2987
3020
|
};
|
|
2988
3021
|
return p;
|
|
2989
3022
|
}, _BoardWatcher_isVaildPoint = function _BoardWatcher_isVaildPoint2(p) {
|
|
2990
|
-
const viewSize = __classPrivateFieldGet$
|
|
3023
|
+
const viewSize = __classPrivateFieldGet$3(this, _BoardWatcher_opts, "f").sharer.getActiveViewSizeInfo();
|
|
2991
3024
|
const { width, height } = viewSize;
|
|
2992
3025
|
if (isBoardAvailableNum(p.x) && isBoardAvailableNum(p.y) && p.x <= width && p.y <= height) {
|
|
2993
3026
|
return true;
|
|
2994
3027
|
}
|
|
2995
3028
|
return false;
|
|
2996
3029
|
};
|
|
2997
|
-
var __classPrivateFieldSet$
|
|
3030
|
+
var __classPrivateFieldSet$2 = function(receiver, state, value, kind, f) {
|
|
2998
3031
|
if (kind === "m")
|
|
2999
3032
|
throw new TypeError("Private method is not writable");
|
|
3000
3033
|
if (kind === "a" && !f)
|
|
@@ -3003,7 +3036,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3003
3036
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3004
3037
|
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
3005
3038
|
};
|
|
3006
|
-
var __classPrivateFieldGet$
|
|
3039
|
+
var __classPrivateFieldGet$2 = function(receiver, state, kind, f) {
|
|
3007
3040
|
if (kind === "a" && !f)
|
|
3008
3041
|
throw new TypeError("Private accessor was defined without a getter");
|
|
3009
3042
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -3034,134 +3067,105 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3034
3067
|
const sharedStore = new Store({
|
|
3035
3068
|
defaultStorage: {}
|
|
3036
3069
|
});
|
|
3037
|
-
__classPrivateFieldSet$
|
|
3038
|
-
__classPrivateFieldSet$
|
|
3070
|
+
__classPrivateFieldSet$2(this, _Sharer_activeStore, activeStore, "f");
|
|
3071
|
+
__classPrivateFieldSet$2(this, _Sharer_sharedStore, sharedStore, "f");
|
|
3039
3072
|
}
|
|
3040
3073
|
getActiveStorage(key2) {
|
|
3041
|
-
return __classPrivateFieldGet$
|
|
3074
|
+
return __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get(key2);
|
|
3042
3075
|
}
|
|
3043
3076
|
setActiveStorage(key2, storage) {
|
|
3044
|
-
return __classPrivateFieldGet$
|
|
3077
|
+
return __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set(key2, storage);
|
|
3045
3078
|
}
|
|
3046
3079
|
getActiveStoreSnapshot() {
|
|
3047
|
-
return __classPrivateFieldGet$
|
|
3080
|
+
return __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").getSnapshot();
|
|
3048
3081
|
}
|
|
3049
3082
|
getSharedStorage(key2) {
|
|
3050
|
-
return __classPrivateFieldGet$
|
|
3083
|
+
return __classPrivateFieldGet$2(this, _Sharer_sharedStore, "f").get(key2);
|
|
3051
3084
|
}
|
|
3052
3085
|
setSharedStorage(key2, storage) {
|
|
3053
|
-
return __classPrivateFieldGet$
|
|
3086
|
+
return __classPrivateFieldGet$2(this, _Sharer_sharedStore, "f").set(key2, storage);
|
|
3054
3087
|
}
|
|
3055
3088
|
getSharedStoreSnapshot() {
|
|
3056
|
-
return __classPrivateFieldGet$
|
|
3089
|
+
return __classPrivateFieldGet$2(this, _Sharer_sharedStore, "f").getSnapshot();
|
|
3057
3090
|
}
|
|
3058
3091
|
getActiveViewScaleInfo() {
|
|
3059
3092
|
const viewScaleInfo = {
|
|
3060
|
-
scale: __classPrivateFieldGet$
|
|
3061
|
-
offsetTop: __classPrivateFieldGet$
|
|
3062
|
-
offsetBottom: __classPrivateFieldGet$
|
|
3063
|
-
offsetLeft: __classPrivateFieldGet$
|
|
3064
|
-
offsetRight: __classPrivateFieldGet$
|
|
3093
|
+
scale: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("scale"),
|
|
3094
|
+
offsetTop: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("offsetTop"),
|
|
3095
|
+
offsetBottom: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("offsetBottom"),
|
|
3096
|
+
offsetLeft: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("offsetLeft"),
|
|
3097
|
+
offsetRight: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("offsetRight")
|
|
3065
3098
|
};
|
|
3066
3099
|
return viewScaleInfo;
|
|
3067
3100
|
}
|
|
3068
3101
|
setActiveViewScaleInfo(viewScaleInfo) {
|
|
3069
3102
|
const { scale, offsetTop, offsetBottom, offsetLeft, offsetRight } = viewScaleInfo;
|
|
3070
|
-
__classPrivateFieldGet$
|
|
3071
|
-
__classPrivateFieldGet$
|
|
3072
|
-
__classPrivateFieldGet$
|
|
3073
|
-
__classPrivateFieldGet$
|
|
3074
|
-
__classPrivateFieldGet$
|
|
3103
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("scale", scale);
|
|
3104
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("offsetTop", offsetTop);
|
|
3105
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("offsetBottom", offsetBottom);
|
|
3106
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("offsetLeft", offsetLeft);
|
|
3107
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("offsetRight", offsetRight);
|
|
3075
3108
|
}
|
|
3076
3109
|
setActiveViewSizeInfo(size) {
|
|
3077
|
-
__classPrivateFieldGet$
|
|
3078
|
-
__classPrivateFieldGet$
|
|
3079
|
-
__classPrivateFieldGet$
|
|
3080
|
-
__classPrivateFieldGet$
|
|
3081
|
-
__classPrivateFieldGet$
|
|
3110
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("width", size.width);
|
|
3111
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("height", size.height);
|
|
3112
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("devicePixelRatio", size.devicePixelRatio);
|
|
3113
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("contextWidth", size.contextWidth);
|
|
3114
|
+
__classPrivateFieldGet$2(this, _Sharer_activeStore, "f").set("contextHeight", size.contextHeight);
|
|
3082
3115
|
}
|
|
3083
3116
|
getActiveViewSizeInfo() {
|
|
3084
3117
|
const sizeInfo = {
|
|
3085
|
-
width: __classPrivateFieldGet$
|
|
3086
|
-
height: __classPrivateFieldGet$
|
|
3087
|
-
devicePixelRatio: __classPrivateFieldGet$
|
|
3088
|
-
contextWidth: __classPrivateFieldGet$
|
|
3089
|
-
contextHeight: __classPrivateFieldGet$
|
|
3118
|
+
width: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("width"),
|
|
3119
|
+
height: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("height"),
|
|
3120
|
+
devicePixelRatio: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("devicePixelRatio"),
|
|
3121
|
+
contextWidth: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("contextWidth"),
|
|
3122
|
+
contextHeight: __classPrivateFieldGet$2(this, _Sharer_activeStore, "f").get("contextHeight")
|
|
3090
3123
|
};
|
|
3091
3124
|
return sizeInfo;
|
|
3092
3125
|
}
|
|
3093
3126
|
}
|
|
3094
3127
|
_Sharer_activeStore = /* @__PURE__ */ new WeakMap(), _Sharer_sharedStore = /* @__PURE__ */ new WeakMap();
|
|
3128
|
+
var __classPrivateFieldSet$1 = function(receiver, state, value, kind, f) {
|
|
3129
|
+
if (kind === "m")
|
|
3130
|
+
throw new TypeError("Private method is not writable");
|
|
3131
|
+
if (kind === "a" && !f)
|
|
3132
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
3133
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
3134
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
3135
|
+
return kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value), value;
|
|
3136
|
+
};
|
|
3137
|
+
var __classPrivateFieldGet$1 = function(receiver, state, kind, f) {
|
|
3138
|
+
if (kind === "a" && !f)
|
|
3139
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
3140
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
3141
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
3142
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
3143
|
+
};
|
|
3144
|
+
var _Viewer_instances, _Viewer_opts, _Viewer_drawFrameSnapshotQueue, _Viewer_drawFrameStatus, _Viewer_init, _Viewer_drawAnimationFrame;
|
|
3095
3145
|
const { requestAnimationFrame } = window;
|
|
3096
3146
|
class Viewer extends EventEmitter {
|
|
3097
3147
|
constructor(opts) {
|
|
3098
3148
|
super();
|
|
3099
|
-
this
|
|
3100
|
-
this
|
|
3101
|
-
this
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
const { renderer } = this._opts;
|
|
3106
|
-
renderer.on("load", () => {
|
|
3107
|
-
this.drawFrame();
|
|
3108
|
-
});
|
|
3109
|
-
}
|
|
3110
|
-
_drawAnimationFrame() {
|
|
3111
|
-
if (this._drawFrameStatus === "DRAWING" || this._drawFrameSnapshotQueue.length === 0) {
|
|
3112
|
-
return;
|
|
3113
|
-
} else {
|
|
3114
|
-
this._drawFrameStatus = "DRAWING";
|
|
3115
|
-
}
|
|
3116
|
-
const snapshot = this._drawFrameSnapshotQueue.shift();
|
|
3117
|
-
const { renderer, boardContent, beforeDrawFrame, afterDrawFrame } = this._opts;
|
|
3118
|
-
if (snapshot) {
|
|
3119
|
-
const { scale, offsetTop, offsetBottom, offsetLeft, offsetRight, width, height, contextHeight, contextWidth, devicePixelRatio } = snapshot.activeStore;
|
|
3120
|
-
if (snapshot === null || snapshot === void 0 ? void 0 : snapshot.activeStore.data) {
|
|
3121
|
-
renderer.drawData(snapshot.activeStore.data, {
|
|
3122
|
-
viewScaleInfo: {
|
|
3123
|
-
scale,
|
|
3124
|
-
offsetTop,
|
|
3125
|
-
offsetBottom,
|
|
3126
|
-
offsetLeft,
|
|
3127
|
-
offsetRight
|
|
3128
|
-
},
|
|
3129
|
-
viewSizeInfo: {
|
|
3130
|
-
width,
|
|
3131
|
-
height,
|
|
3132
|
-
contextHeight,
|
|
3133
|
-
contextWidth,
|
|
3134
|
-
devicePixelRatio
|
|
3135
|
-
}
|
|
3136
|
-
});
|
|
3137
|
-
}
|
|
3138
|
-
beforeDrawFrame({ snapshot });
|
|
3139
|
-
boardContent.drawView();
|
|
3140
|
-
afterDrawFrame({ snapshot });
|
|
3141
|
-
}
|
|
3142
|
-
if (this._drawFrameSnapshotQueue.length === 0) {
|
|
3143
|
-
this._drawFrameStatus = "COMPLETE";
|
|
3144
|
-
return;
|
|
3145
|
-
}
|
|
3146
|
-
if (this._drawFrameStatus = "DRAWING") {
|
|
3147
|
-
requestAnimationFrame(() => {
|
|
3148
|
-
this._drawAnimationFrame();
|
|
3149
|
-
});
|
|
3150
|
-
}
|
|
3149
|
+
_Viewer_instances.add(this);
|
|
3150
|
+
_Viewer_opts.set(this, void 0);
|
|
3151
|
+
_Viewer_drawFrameSnapshotQueue.set(this, []);
|
|
3152
|
+
_Viewer_drawFrameStatus.set(this, "FREE");
|
|
3153
|
+
__classPrivateFieldSet$1(this, _Viewer_opts, opts, "f");
|
|
3154
|
+
__classPrivateFieldGet$1(this, _Viewer_instances, "m", _Viewer_init).call(this);
|
|
3151
3155
|
}
|
|
3152
3156
|
drawFrame() {
|
|
3153
|
-
const { sharer } = this
|
|
3157
|
+
const { sharer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3154
3158
|
const activeStore = sharer.getActiveStoreSnapshot();
|
|
3155
3159
|
const sharedStore = sharer.getSharedStoreSnapshot();
|
|
3156
|
-
this.
|
|
3160
|
+
__classPrivateFieldGet$1(this, _Viewer_drawFrameSnapshotQueue, "f").push({
|
|
3157
3161
|
activeStore,
|
|
3158
3162
|
sharedStore
|
|
3159
3163
|
});
|
|
3160
|
-
this.
|
|
3164
|
+
__classPrivateFieldGet$1(this, _Viewer_instances, "m", _Viewer_drawAnimationFrame).call(this);
|
|
3161
3165
|
}
|
|
3162
3166
|
scale(opts) {
|
|
3163
3167
|
const { scale, point } = opts;
|
|
3164
|
-
const { sharer } = this
|
|
3168
|
+
const { sharer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3165
3169
|
const { moveX, moveY } = viewScale({
|
|
3166
3170
|
scale,
|
|
3167
3171
|
point,
|
|
@@ -3172,7 +3176,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3172
3176
|
return { moveX, moveY };
|
|
3173
3177
|
}
|
|
3174
3178
|
scroll(opts) {
|
|
3175
|
-
const { sharer } = this
|
|
3179
|
+
const { sharer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3176
3180
|
const prevViewScaleInfo = sharer.getActiveViewScaleInfo();
|
|
3177
3181
|
const { moveX, moveY } = opts;
|
|
3178
3182
|
const viewSizeInfo = sharer.getActiveViewSizeInfo();
|
|
@@ -3186,7 +3190,7 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3186
3190
|
return viewScaleInfo;
|
|
3187
3191
|
}
|
|
3188
3192
|
updateViewScaleInfo(opts) {
|
|
3189
|
-
const { sharer } = this
|
|
3193
|
+
const { sharer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3190
3194
|
const viewScaleInfo = calcViewScaleInfo(opts, {
|
|
3191
3195
|
viewSizeInfo: sharer.getActiveViewSizeInfo()
|
|
3192
3196
|
});
|
|
@@ -3194,11 +3198,11 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3194
3198
|
return viewScaleInfo;
|
|
3195
3199
|
}
|
|
3196
3200
|
resize(viewSize = {}) {
|
|
3197
|
-
const { sharer } = this
|
|
3201
|
+
const { sharer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3198
3202
|
const originViewSize = sharer.getActiveViewSizeInfo();
|
|
3199
3203
|
const newViewSize = Object.assign(Object.assign({}, originViewSize), viewSize);
|
|
3200
3204
|
const { width, height, devicePixelRatio } = newViewSize;
|
|
3201
|
-
const { underContext, boardContext, helperContext, viewContext } = this.
|
|
3205
|
+
const { underContext, boardContext, helperContext, viewContext } = __classPrivateFieldGet$1(this, _Viewer_opts, "f").boardContent;
|
|
3202
3206
|
boardContext.canvas.width = width * devicePixelRatio;
|
|
3203
3207
|
boardContext.canvas.height = height * devicePixelRatio;
|
|
3204
3208
|
boardContext.canvas.style.width = `${width}px`;
|
|
@@ -3213,6 +3217,55 @@ var __privateMethod = (obj, member, method) => {
|
|
|
3213
3217
|
return newViewSize;
|
|
3214
3218
|
}
|
|
3215
3219
|
}
|
|
3220
|
+
_Viewer_opts = /* @__PURE__ */ new WeakMap(), _Viewer_drawFrameSnapshotQueue = /* @__PURE__ */ new WeakMap(), _Viewer_drawFrameStatus = /* @__PURE__ */ new WeakMap(), _Viewer_instances = /* @__PURE__ */ new WeakSet(), _Viewer_init = function _Viewer_init2() {
|
|
3221
|
+
const { renderer } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3222
|
+
renderer.on("load", () => {
|
|
3223
|
+
this.drawFrame();
|
|
3224
|
+
});
|
|
3225
|
+
}, _Viewer_drawAnimationFrame = function _Viewer_drawAnimationFrame2() {
|
|
3226
|
+
if (__classPrivateFieldGet$1(this, _Viewer_drawFrameStatus, "f") === "DRAWING" || __classPrivateFieldGet$1(this, _Viewer_drawFrameSnapshotQueue, "f").length === 0) {
|
|
3227
|
+
return;
|
|
3228
|
+
} else {
|
|
3229
|
+
__classPrivateFieldSet$1(this, _Viewer_drawFrameStatus, "DRAWING", "f");
|
|
3230
|
+
}
|
|
3231
|
+
const snapshot = __classPrivateFieldGet$1(this, _Viewer_drawFrameSnapshotQueue, "f").shift();
|
|
3232
|
+
const { renderer, boardContent, beforeDrawFrame, afterDrawFrame } = __classPrivateFieldGet$1(this, _Viewer_opts, "f");
|
|
3233
|
+
if (snapshot) {
|
|
3234
|
+
const { scale, offsetTop, offsetBottom, offsetLeft, offsetRight, width, height, contextHeight, contextWidth, devicePixelRatio } = snapshot.activeStore;
|
|
3235
|
+
const viewScaleInfo = {
|
|
3236
|
+
scale,
|
|
3237
|
+
offsetTop,
|
|
3238
|
+
offsetBottom,
|
|
3239
|
+
offsetLeft,
|
|
3240
|
+
offsetRight
|
|
3241
|
+
};
|
|
3242
|
+
const viewSizeInfo = {
|
|
3243
|
+
width,
|
|
3244
|
+
height,
|
|
3245
|
+
contextHeight,
|
|
3246
|
+
contextWidth,
|
|
3247
|
+
devicePixelRatio
|
|
3248
|
+
};
|
|
3249
|
+
if (snapshot === null || snapshot === void 0 ? void 0 : snapshot.activeStore.data) {
|
|
3250
|
+
renderer.drawData(snapshot.activeStore.data, {
|
|
3251
|
+
viewScaleInfo,
|
|
3252
|
+
viewSizeInfo
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
beforeDrawFrame({ snapshot });
|
|
3256
|
+
boardContent.drawView();
|
|
3257
|
+
afterDrawFrame({ snapshot });
|
|
3258
|
+
}
|
|
3259
|
+
if (__classPrivateFieldGet$1(this, _Viewer_drawFrameSnapshotQueue, "f").length === 0) {
|
|
3260
|
+
__classPrivateFieldSet$1(this, _Viewer_drawFrameStatus, "COMPLETE", "f");
|
|
3261
|
+
return;
|
|
3262
|
+
}
|
|
3263
|
+
if (__classPrivateFieldSet$1(this, _Viewer_drawFrameStatus, "DRAWING", "f")) {
|
|
3264
|
+
requestAnimationFrame(() => {
|
|
3265
|
+
__classPrivateFieldGet$1(this, _Viewer_instances, "m", _Viewer_drawAnimationFrame2).call(this);
|
|
3266
|
+
});
|
|
3267
|
+
}
|
|
3268
|
+
};
|
|
3216
3269
|
var __classPrivateFieldSet = function(receiver, state, value, kind, f) {
|
|
3217
3270
|
if (kind === "m")
|
|
3218
3271
|
throw new TypeError("Private method is not writable");
|