@everymatrix/casino-game-thumb-view 1.44.0 → 1.45.2
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/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
- package/dist/casino-game-thumb-view/p-2207062c.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
- package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
- package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
- package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
- package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
- package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
- package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -34
- package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
- package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -519
- package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +258 -251
- package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
- package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
- package/dist/cjs/index-48d13981.js +1709 -0
- package/dist/cjs/loader.cjs.js +7 -13
- package/dist/cjs/locale.utils-53bf703a.js +132 -0
- package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
- package/dist/collection/collection-manifest.json +10 -10
- package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
- package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
- package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -119
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
- package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1027
- package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
- package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
- package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +153 -150
- package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -206
- package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
- package/dist/collection/constants/game-thumbnail.js +66 -66
- package/dist/collection/models/casino-game-thumb-view.js +6 -6
- package/dist/collection/models/currency-symbols.js +170 -170
- package/dist/collection/utils/baccarat-board-svg.js +225 -225
- package/dist/collection/utils/locale.utils.js +122 -122
- package/dist/collection/utils/utils.js +41 -41
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
- package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
- package/dist/esm/casino-extrainfo-roulette.entry.js +35 -34
- package/dist/esm/casino-game-thumb-view.js +14 -11
- package/dist/esm/casino-game-thumb-view_2.entry.js +469 -519
- package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +258 -251
- package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
- package/dist/esm/game-thumbnail-035e97e2.js +72 -0
- package/dist/esm/index-8c9a8030.js +1681 -0
- package/dist/esm/loader.js +7 -13
- package/dist/esm/locale.utils-0c514ca8.js +130 -0
- package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +12 -35
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
- package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
- package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
- package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
- package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
- package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
- package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
- package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
- package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -28
- package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
- package/dist/types/components.d.ts +33 -2
- package/dist/types/constants/game-thumbnail.d.ts +66 -66
- package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
- package/dist/types/models/currency-symbols.d.ts +170 -170
- package/dist/types/stencil-public-runtime.d.ts +142 -33
- package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
- package/loader/cdn.js +1 -3
- package/loader/index.cjs.js +1 -3
- package/loader/index.d.ts +13 -1
- package/loader/index.es2017.js +1 -3
- package/loader/index.js +1 -3
- package/loader/package.json +1 -0
- package/package.json +8 -8
- package/dist/assets/baccarat.svg +0 -43
- package/dist/assets/fav.svg +0 -9
- package/dist/assets/favorite.svg +0 -12
- package/dist/assets/seat.svg +0 -6
- package/dist/assets/unfav.svg +0 -20
- package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-42bf2034.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
- package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
- package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
- package/dist/casino-game-thumb-view/p-db43bb56.entry.js +0 -7
- package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
- package/dist/cjs/index-65a1d768.js +0 -1796
- package/dist/cjs/locale.utils-aa160787.js +0 -132
- package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
- package/dist/components/casino-extrainfo-baccarat.js +0 -400
- package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
- package/dist/components/casino-extrainfo-blackjack.js +0 -92
- package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
- package/dist/components/casino-extrainfo-roulette.js +0 -78
- package/dist/components/casino-game-thumb-view.d.ts +0 -11
- package/dist/components/casino-game-thumb-view.js +0 -1625
- package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
- package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
- package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
- package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -96
- package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
- package/dist/components/casino-game-thumbnail-overlay.js +0 -6
- package/dist/components/casino-game-thumbnail-overlay2.js +0 -69
- package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
- package/dist/components/casino-normal-game-thumbnail.js +0 -52
- package/dist/components/game-thumbnail.js +0 -72
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/locale.utils.js +0 -130
- package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
- package/dist/esm/index-1e44dd9f.js +0 -1769
- package/dist/esm/locale.utils-e0cf897e.js +0 -130
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/utils-e9314132.js +0 -5739
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
- /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
- /package/dist/casino-game-thumb-view/{p-1e63a1ab.js → p-59ceeaaa.js} +0 -0
@@ -4,231 +4,231 @@ const BACCARTAT_COLUMN = 40;
|
|
4
4
|
const TIE_ANGLE = 135;
|
5
5
|
const PLAYER_ANGLE = 45;
|
6
6
|
export class BaccaratSvg {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
});
|
100
|
-
objToAddAnimate.appendChild(animate);
|
101
|
-
}
|
102
|
-
markNewRound(x, y, options, markNew = false) {
|
103
|
-
let centre = this.getCenterPoint(x, y);
|
104
|
-
let svgG = this.createTag('g', {
|
105
|
-
'class': `Round ${markNew ? 'NewRound' : ''} ${options.winner === BaccaratWinner.TIE ? 'Tie' : ''}`,
|
106
|
-
'part': `Round ${markNew ? 'NewRound' : ''}`, 'opacity': markNew ? 0.1 : 1
|
107
|
-
});
|
108
|
-
//RoundWinner: TIE
|
109
|
-
if (options.winner === BaccaratWinner.TIE) {
|
110
|
-
svgG.appendChild(this.createTieSvg(x, y));
|
111
|
-
this.svgGroupObj.appendChild(svgG);
|
112
|
-
if (options.ties && options.ties > 1) {
|
113
|
-
let text = this.createTag('text', {
|
114
|
-
'x': centre.cx - 1.5,
|
115
|
-
'y': centre.cy + this.markGroupExtraClass.fontSize / 2 - 1.1,
|
116
|
-
'fill': '#12153d',
|
117
|
-
'class': 'TieNumber',
|
118
|
-
'font-size': `${this.markGroupExtraClass.fontSize}px`,
|
119
|
-
'font-weight': this.markGroupExtraClass.fontSize > 7 ? 'bold' : ''
|
7
|
+
constructor() {
|
8
|
+
this.svgNS = 'http://www.w3.org/2000/svg';
|
9
|
+
this.svgVersion = '1.1';
|
10
|
+
this.markGroupExtraClass = {
|
11
|
+
name: '',
|
12
|
+
strokeWidth: 1.8,
|
13
|
+
cellPadding: 6
|
14
|
+
};
|
15
|
+
}
|
16
|
+
resetSvg() {
|
17
|
+
this.svgGroupObj.innerHTML = '';
|
18
|
+
}
|
19
|
+
createTag(tag, attrs) {
|
20
|
+
let oTag = document.createElementNS(this.svgNS, tag);
|
21
|
+
Object.keys(attrs).forEach((attr) => {
|
22
|
+
oTag.setAttribute(attr, attrs[attr]);
|
23
|
+
});
|
24
|
+
return oTag;
|
25
|
+
}
|
26
|
+
;
|
27
|
+
//Y1 = Y2, X1=0;
|
28
|
+
createHLine(lineIdx) {
|
29
|
+
return this.createTag('line', {
|
30
|
+
'x1': 0,
|
31
|
+
'x2': this.svgWidth,
|
32
|
+
'y1': lineIdx * this.cellHeight,
|
33
|
+
'y2': lineIdx * this.cellHeight
|
34
|
+
});
|
35
|
+
}
|
36
|
+
createVLine(lineIdx) {
|
37
|
+
return this.createTag('line', {
|
38
|
+
'x1': lineIdx * this.cellWidth,
|
39
|
+
'x2': lineIdx * this.cellWidth,
|
40
|
+
'y1': 0,
|
41
|
+
'y2': this.svgHeight
|
42
|
+
});
|
43
|
+
}
|
44
|
+
createBaccaratBoard(parentEle) {
|
45
|
+
this.parentEle = parentEle;
|
46
|
+
this.svgWidth = parentEle.clientWidth;
|
47
|
+
this.cellWidth = this.svgWidth / BACCARTAT_COLUMN;
|
48
|
+
this.cellHeight = this.cellWidth;
|
49
|
+
this.svgHeight = this.cellHeight * BACCARAT_ROW;
|
50
|
+
let dynamicStyles = {};
|
51
|
+
if (this.svgWidth < 300) {
|
52
|
+
dynamicStyles = {
|
53
|
+
name: 'Min',
|
54
|
+
strokeWidth: 0.8,
|
55
|
+
cellPadding: 2
|
56
|
+
};
|
57
|
+
}
|
58
|
+
else if (this.svgWidth >= 300 && this.svgWidth < 500) {
|
59
|
+
dynamicStyles = {
|
60
|
+
name: 'Mid',
|
61
|
+
strokeWidth: 1.5,
|
62
|
+
cellPadding: 3.8
|
63
|
+
};
|
64
|
+
}
|
65
|
+
this.markGroupExtraClass = Object.assign(Object.assign({}, this.markGroupExtraClass), dynamicStyles);
|
66
|
+
this.markGroupExtraClass.fontSize = this.cellWidth - this.markGroupExtraClass.cellPadding * 0.8;
|
67
|
+
this.markGroupExtraClass.pairDotR = this.markGroupExtraClass.strokeWidth / 2;
|
68
|
+
this.markGroupExtraClass.pairBackDotR = this.markGroupExtraClass.pairDotR + 0.4;
|
69
|
+
let svgObj = this.createTag('svg', { 'xmlns': this.svgNS, 'version': this.svgVersion, 'width': '100%' });
|
70
|
+
let svgGroup = this.createTag('g', {
|
71
|
+
'style': 'cursor: pointer',
|
72
|
+
'stroke': '#a1acb696',
|
73
|
+
'stroke-width': '0.6px',
|
74
|
+
'fill': 'transparent'
|
75
|
+
});
|
76
|
+
let markGroup = this.createTag('g', {
|
77
|
+
'style': 'cursor: pointer', 'class': `BoardRoundsGroup ${this.markGroupExtraClass.name}`,
|
78
|
+
'stroke-width': this.markGroupExtraClass.strokeWidth, 'fill': 'transparent'
|
79
|
+
});
|
80
|
+
for (let i = 0; i < BACCARAT_ROW + 1; i++) {
|
81
|
+
svgGroup.appendChild(this.createHLine(i));
|
82
|
+
}
|
83
|
+
for (let i = 0; i < BACCARTAT_COLUMN + 1; i++) {
|
84
|
+
svgGroup.appendChild(this.createVLine(i));
|
85
|
+
}
|
86
|
+
parentEle.setAttribute('style', `height: ${this.svgHeight}px`);
|
87
|
+
svgObj.appendChild(svgGroup);
|
88
|
+
svgObj.appendChild(markGroup);
|
89
|
+
parentEle.replaceChildren(svgObj);
|
90
|
+
this.svgGroupObj = markGroup;
|
91
|
+
}
|
92
|
+
getRadius() {
|
93
|
+
return (this.cellHeight - this.markGroupExtraClass.cellPadding) / 2;
|
94
|
+
}
|
95
|
+
addAnimate(objToAddAnimate) {
|
96
|
+
let animate = this.createTag('animate', {
|
97
|
+
'attributeName': 'opacity', attributeType: 'XML', 'from': '0', to: 0.8, repeatCount: '5',
|
98
|
+
begin: '0s', dur: '1.5s', 'calcMode': 'spline', keySplines: "0.1 0.8 0.9 0.1", fill: 'freeze'
|
120
99
|
});
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
100
|
+
objToAddAnimate.appendChild(animate);
|
101
|
+
}
|
102
|
+
markNewRound(x, y, options, markNew = false) {
|
103
|
+
let centre = this.getCenterPoint(x, y);
|
104
|
+
let svgG = this.createTag('g', {
|
105
|
+
'class': `Round ${markNew ? 'NewRound' : ''} ${options.winner === BaccaratWinner.TIE ? 'Tie' : ''}`,
|
106
|
+
'part': `Round ${markNew ? 'NewRound' : ''}`, 'opacity': markNew ? 0.1 : 1
|
107
|
+
});
|
108
|
+
//RoundWinner: TIE
|
109
|
+
if (options.winner === BaccaratWinner.TIE) {
|
110
|
+
svgG.appendChild(this.createTieSvg(x, y));
|
111
|
+
this.svgGroupObj.appendChild(svgG);
|
112
|
+
if (options.ties && options.ties > 1) {
|
113
|
+
let text = this.createTag('text', {
|
114
|
+
'x': centre.cx - 1.5,
|
115
|
+
'y': centre.cy + this.markGroupExtraClass.fontSize / 2 - 1.1,
|
116
|
+
'fill': '#12153d',
|
117
|
+
'class': 'TieNumber',
|
118
|
+
'font-size': `${this.markGroupExtraClass.fontSize}px`,
|
119
|
+
'font-weight': this.markGroupExtraClass.fontSize > 7 ? 'bold' : ''
|
120
|
+
});
|
121
|
+
text.innerHTML = options.ties;
|
122
|
+
svgG.appendChild(text);
|
123
|
+
}
|
124
|
+
this.svgGroupObj.appendChild(svgG);
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
svgG.appendChild(this.createTag('circle', {
|
128
|
+
r: this.getRadius(),
|
129
|
+
'class': 'Round',
|
130
|
+
'stroke': options.color,
|
131
|
+
'cx': x * this.cellHeight + (this.cellHeight) / 2,
|
132
|
+
'cy': y * this.cellHeight + (this.cellHeight) / 2
|
133
|
+
}));
|
134
|
+
if (options.ties) {
|
135
|
+
svgG.appendChild(this.createTieSvg(x, y));
|
136
|
+
if (options.ties > 1) {
|
137
|
+
let text = this.createTag('text', {
|
138
|
+
'x': centre.cx - 1.5,
|
139
|
+
'y': centre.cy + this.markGroupExtraClass.fontSize / 2 - 1.1,
|
140
|
+
'fill': '#12153d',
|
141
|
+
'class': 'TieNumber',
|
142
|
+
'font-size': `${this.markGroupExtraClass.fontSize}px`,
|
143
|
+
'font-weight': this.markGroupExtraClass.fontSize > 7 ? 'bold' : ''
|
144
|
+
});
|
145
|
+
text.innerHTML = options.ties;
|
146
|
+
svgG.appendChild(text);
|
147
|
+
}
|
148
|
+
this.svgGroupObj.appendChild(svgG);
|
149
|
+
}
|
150
|
+
if (options.bankerPair) {
|
151
|
+
let dots = this.createPairDot(x, y, options.pairColor.banker, PLAYER_ANGLE + 180);
|
152
|
+
dots.forEach(dot => svgG.appendChild(dot));
|
153
|
+
}
|
154
|
+
if (options.playerPair) {
|
155
|
+
let dots = this.createPairDot(x, y, options.pairColor.player, PLAYER_ANGLE);
|
156
|
+
dots.forEach(dot => svgG.appendChild(dot));
|
157
|
+
}
|
158
|
+
if (options.includeAnimate) {
|
159
|
+
this.addAnimate(svgG);
|
160
|
+
}
|
161
|
+
this.svgGroupObj.appendChild(svgG);
|
162
|
+
}
|
163
|
+
markRound(x, y, color, includeAnimate = false) {
|
164
|
+
let circleSvg = this.createTag('circle', {
|
165
|
+
r: this.getRadius(),
|
166
|
+
'class': 'Round',
|
167
|
+
'stroke': color,
|
168
|
+
'cx': x * this.cellHeight + (this.cellHeight) / 2,
|
169
|
+
'cy': y * this.cellHeight + (this.cellHeight) / 2
|
170
|
+
});
|
171
|
+
if (includeAnimate) {
|
172
|
+
this.addAnimate(circleSvg);
|
173
|
+
}
|
174
|
+
this.svgGroupObj.appendChild(circleSvg);
|
175
|
+
}
|
176
|
+
getCenterPoint(x, y) {
|
177
|
+
return {
|
178
|
+
'cx': x * this.cellHeight + (this.cellHeight) / 2,
|
179
|
+
'cy': y * this.cellHeight + (this.cellHeight) / 2
|
180
|
+
};
|
181
|
+
}
|
182
|
+
createTieSvg(x, y) {
|
183
|
+
let centerXY = this.getCenterPoint(x, y), angle = TIE_ANGLE, r = (this.cellHeight) / 2;
|
184
|
+
const x1 = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
|
185
|
+
const y1 = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
|
186
|
+
const x2 = centerXY.cx + r * Math.cos((angle + 180) * Math.PI / 180);
|
187
|
+
const y2 = centerXY.cy + r * Math.sin((angle + 180) * Math.PI / 180);
|
188
|
+
return this.createTag('line', {
|
189
|
+
x1, y1, x2, y2, 'class': 'Tie',
|
190
|
+
'stroke': 'green', 'opacity': '0.8', 'stroke-width': '1.8px'
|
144
191
|
});
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
}
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
}
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
const y2 = centerXY.cy + r * Math.sin((angle + 180) * Math.PI / 180);
|
188
|
-
return this.createTag('line', {
|
189
|
-
x1, y1, x2, y2, 'class': 'Tie',
|
190
|
-
'stroke': 'green', 'opacity': '0.8', 'stroke-width': '1.8px'
|
191
|
-
});
|
192
|
-
}
|
193
|
-
createPairDot(x, y, pairColor, angle) {
|
194
|
-
let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
|
195
|
-
const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
|
196
|
-
const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
|
197
|
-
return [
|
198
|
-
this.createTag('circle', {
|
199
|
-
cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
|
200
|
-
'stroke': '#fff'
|
201
|
-
}),
|
202
|
-
this.createTag('circle', {
|
203
|
-
cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
|
204
|
-
'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
|
205
|
-
})
|
206
|
-
];
|
207
|
-
}
|
208
|
-
markTie(x, y, includeAnimate = false) {
|
209
|
-
let line = this.createTieSvg(x, y);
|
210
|
-
if (includeAnimate) {
|
211
|
-
this.addAnimate(line);
|
212
|
-
}
|
213
|
-
this.svgGroupObj.appendChild(line);
|
214
|
-
}
|
215
|
-
markPair(x, y, pairColor, angle) {
|
216
|
-
let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
|
217
|
-
const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
|
218
|
-
const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
|
219
|
-
this.svgGroupObj.appendChild(this.createTag('circle', {
|
220
|
-
cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
|
221
|
-
'stroke': '#fff'
|
222
|
-
}));
|
223
|
-
this.svgGroupObj.appendChild(this.createTag('circle', {
|
224
|
-
cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
|
225
|
-
'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
|
226
|
-
}));
|
227
|
-
}
|
228
|
-
markBankerPair(x, y, pairColor) {
|
229
|
-
this.markPair(x, y, pairColor, 225);
|
230
|
-
}
|
231
|
-
markPlayerPair(x, y, pairColor) {
|
232
|
-
this.markPair(x, y, pairColor, 45);
|
233
|
-
}
|
192
|
+
}
|
193
|
+
createPairDot(x, y, pairColor, angle) {
|
194
|
+
let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
|
195
|
+
const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
|
196
|
+
const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
|
197
|
+
return [
|
198
|
+
this.createTag('circle', {
|
199
|
+
cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
|
200
|
+
'stroke': '#fff'
|
201
|
+
}),
|
202
|
+
this.createTag('circle', {
|
203
|
+
cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
|
204
|
+
'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
|
205
|
+
})
|
206
|
+
];
|
207
|
+
}
|
208
|
+
markTie(x, y, includeAnimate = false) {
|
209
|
+
let line = this.createTieSvg(x, y);
|
210
|
+
if (includeAnimate) {
|
211
|
+
this.addAnimate(line);
|
212
|
+
}
|
213
|
+
this.svgGroupObj.appendChild(line);
|
214
|
+
}
|
215
|
+
markPair(x, y, pairColor, angle) {
|
216
|
+
let centerXY = this.getCenterPoint(x, y), r = this.getRadius() + this.markGroupExtraClass.pairDotR;
|
217
|
+
const cx = centerXY.cx + r * Math.cos(angle * Math.PI / 180);
|
218
|
+
const cy = centerXY.cy + r * Math.sin(angle * Math.PI / 180);
|
219
|
+
this.svgGroupObj.appendChild(this.createTag('circle', {
|
220
|
+
cx, cy, r: this.markGroupExtraClass.pairBackDotR, 'class': 'DotBack',
|
221
|
+
'stroke': '#fff'
|
222
|
+
}));
|
223
|
+
this.svgGroupObj.appendChild(this.createTag('circle', {
|
224
|
+
cx, cy, r: this.markGroupExtraClass.pairDotR, 'class': 'Dot',
|
225
|
+
'stroke': pairColor, 'stroke-width': '0.8px', 'fill': pairColor
|
226
|
+
}));
|
227
|
+
}
|
228
|
+
markBankerPair(x, y, pairColor) {
|
229
|
+
this.markPair(x, y, pairColor, 225);
|
230
|
+
}
|
231
|
+
markPlayerPair(x, y, pairColor) {
|
232
|
+
this.markPair(x, y, pairColor, 45);
|
233
|
+
}
|
234
234
|
}
|