@luceosports/play-rendering 2.2.7 → 2.2.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/play-rendering.js +2 -2
- package/dist/play-rendering.js.map +1 -1
- package/package.json +1 -1
- package/src/layers/LineControlPointLayer.ts +2 -1
- package/src/layers/LineLayer.ts +2 -1
- package/src/models/FrameModel.ts +1 -2
- package/src/models/Play/Options.ts +1 -1
- package/src/models/PlayModel.ts +1 -1
package/package.json
CHANGED
|
@@ -2,7 +2,8 @@ import BaseLayer from './base/BaseLayer';
|
|
|
2
2
|
|
|
3
3
|
export default class LineControlPointLayer extends BaseLayer {
|
|
4
4
|
apply() {
|
|
5
|
-
if (
|
|
5
|
+
if (this.options.linesDisplay === 'HIDDEN') return;
|
|
6
|
+
if (this.options.linesDisplay === 'START_HIDDEN' && !this.options.animationGlobalProgress) return;
|
|
6
7
|
|
|
7
8
|
this.ctx.save();
|
|
8
9
|
|
package/src/layers/LineLayer.ts
CHANGED
|
@@ -8,7 +8,8 @@ export default class LineLayer extends BaseLayer {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
apply() {
|
|
11
|
-
if (
|
|
11
|
+
if (this.options.linesDisplay === 'HIDDEN') return;
|
|
12
|
+
if (this.options.linesDisplay === 'START_HIDDEN' && !this.options.animationGlobalProgress) return;
|
|
12
13
|
|
|
13
14
|
this.ctx.save();
|
|
14
15
|
|
package/src/models/FrameModel.ts
CHANGED
|
@@ -489,9 +489,8 @@ export default class FrameModel {
|
|
|
489
489
|
prepareCourtPoint(courtPoint: CourtPoint) {
|
|
490
490
|
const { mirror } = this.play.options;
|
|
491
491
|
const { width } = this.play.playData.court.courtRect.size;
|
|
492
|
-
const { origin } = this.play.playData.court.courtRect;
|
|
493
492
|
return {
|
|
494
|
-
x: mirror ? width
|
|
493
|
+
x: mirror ? width - courtPoint.x : courtPoint.x,
|
|
495
494
|
y: courtPoint.y
|
|
496
495
|
};
|
|
497
496
|
}
|
|
@@ -4,7 +4,7 @@ export function useDefaults(options?: Partial<PlayModelOptions>): PlayModelOptio
|
|
|
4
4
|
const defaults = {
|
|
5
5
|
width: 300,
|
|
6
6
|
lineColor: '#fff', // courtBorderColor
|
|
7
|
-
linesDisplay:
|
|
7
|
+
linesDisplay: 'VISIBLE' as const,
|
|
8
8
|
linesDisplayOnMoveOnly: true,
|
|
9
9
|
linesHiddenIds: [],
|
|
10
10
|
linesSelectedIds: [],
|
package/src/models/PlayModel.ts
CHANGED
|
@@ -63,7 +63,7 @@ export type TeamPlayer = {
|
|
|
63
63
|
export type PlayModelOptions = {
|
|
64
64
|
width: number;
|
|
65
65
|
lineColor: string;
|
|
66
|
-
linesDisplay:
|
|
66
|
+
linesDisplay: 'VISIBLE' | 'HIDDEN' | 'START_HIDDEN';
|
|
67
67
|
linesSelectedIds: string[];
|
|
68
68
|
shapeSelectedId: string | null;
|
|
69
69
|
noteSelectedId: string | null;
|