@alisaitteke/seatmap-canvas 2.0.3 → 2.3.0
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/.github/workflows/publish.yml +1 -1
- package/.opencommitignore +2 -1
- package/CHANGELOG.md +2 -0
- package/README.md +3 -5
- package/dist/cjs/index.js +16 -0
- package/examples/index.html +171 -0
- package/package.json +19 -12
- package/rollup.config.js +56 -0
- package/src/lib/canvas.index.ts +2 -3
- package/src/lib/config.ts +1 -1
- package/src/lib/decorators/dom.ts +1 -1
- package/src/lib/decorators/index.ts +1 -1
- package/src/lib/dev.tools.ts +1 -1
- package/src/lib/enums/global.ts +3 -3
- package/src/lib/models/block.model.ts +23 -128
- package/src/lib/models/coordinate.model.ts +3 -20
- package/src/lib/models/data.model.ts +29 -9
- package/src/lib/models/defaults.model.ts +10 -4
- package/src/lib/models/global.model.ts +1 -1
- package/src/lib/models/label.model.ts +5 -38
- package/src/lib/models/legend.model.ts +6 -38
- package/src/lib/models/model.base.ts +5 -22
- package/src/lib/models/seat.model.ts +18 -126
- package/src/lib/svg/event.manager.ts +6 -14
- package/src/lib/svg/legend/legend.circle.ts +1 -1
- package/src/lib/svg/legend/legend.item.ts +7 -4
- package/src/lib/svg/legend/legend.title.ts +2 -2
- package/src/lib/svg/legend.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/block-item.bounds.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/block-item.index.ts +17 -5
- package/src/lib/svg/stage/blocks/block-item/block-item.info.index.ts +2 -1
- package/src/lib/svg/stage/blocks/block-item/block-item.labels.index.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/block-item.mask.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/block-item.seats.index.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/bound/bound-item.index.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/info/title.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/label/label-item.circle.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/label/label-item.index.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/label/label-item.title.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/seat/seat-item.check.ts +12 -5
- package/src/lib/svg/stage/blocks/block-item/seat/seat-item.circle.ts +1 -1
- package/src/lib/svg/stage/blocks/block-item/seat/seat-item.index.ts +4 -4
- package/src/lib/svg/stage/blocks/block-item/seat/seat-item.title.ts +1 -1
- package/src/lib/svg/stage/blocks/blocks.index.ts +8 -5
- package/src/lib/svg/stage/blocks.search-circle.ts +1 -1
- package/src/lib/svg/stage/multi-select/rect.ts +1 -1
- package/src/lib/svg/stage/multi-select.ts +1 -1
- package/src/lib/svg/stage/search-circle/circle.ts +1 -1
- package/src/lib/svg/stage/stage.index.ts +1 -1
- package/src/lib/svg/svg.base.ts +40 -28
- package/src/lib/svg/svg.index.ts +1 -1
- package/src/lib/svg/tooltip/rect.ts +1 -1
- package/src/lib/svg/tooltip/title.ts +2 -11
- package/src/lib/svg/tooltip.ts +4 -3
- package/src/lib/svg/zoom-out.bg.ts +2 -2
- package/src/lib/svg/zoom.manager.ts +56 -48
- package/src/lib/window.manager.ts +3 -3
- package/tsconfig.json +21 -17
- package/dist/seatmap.canvas.2.0.2.css +0 -1
- package/dist/seatmap.canvas.2.0.2.js +0 -2
- package/dist/seatmap.canvas.2.0.2.js.LICENSE.txt +0 -14
- package/examples/basic/bootstrap.min.css +0 -7
- package/examples/basic/index.html +0 -201
- package/examples/basic/jquery.min.js +0 -2
- package/examples/data/data.json +0 -70007
- package/examples/data/small.json +0 -1307
- package/examples/data/tiny.json +0 -119
- package/examples/old/index.html +0 -262
- package/webpack.environments/development.js +0 -58
- package/webpack.environments/production.js +0 -52
package/src/lib/config.ts
CHANGED
package/src/lib/dev.tools.ts
CHANGED
package/src/lib/enums/global.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
enum BLOCK_EVENT {
|
|
@@ -35,8 +35,8 @@ export enum EventType {
|
|
|
35
35
|
|
|
36
36
|
RESIZE_WINDOW = "WINDOW.RESIZE",
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
CLICK_ZOOM_OUT = "ZOOM-OUT-BG.CLICK",
|
|
39
|
+
MOUSEMOVE_ZOOM_OUT = "ZOOM-OUT-BG.MOUSEMOVE",
|
|
40
40
|
|
|
41
41
|
KEYDOWN_SVG = "KEYDOWN.SEATMAP-SVG",
|
|
42
42
|
KEYUP_SVG = "KEYUP.SEATMAP-SVG",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
* https://github.com/seatmap/canvas Copyright 2018 Ali Sait TEKE
|
|
2
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
3
|
*/
|
|
5
4
|
|
|
6
5
|
|
|
@@ -10,19 +9,20 @@ import ModelBase from "./model.base";
|
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
export default class BlockModel extends ModelBase {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
id: string;
|
|
13
|
+
seats: Array<SeatModel>;
|
|
14
|
+
labels: Array<LabelModel>;
|
|
15
|
+
title: String;
|
|
16
|
+
bounds: any;
|
|
17
|
+
width: number;
|
|
18
|
+
height: number;
|
|
19
|
+
x: number;
|
|
20
|
+
y: number;
|
|
21
|
+
color: string;
|
|
22
|
+
border_color: string;
|
|
23
|
+
bbox: any;
|
|
24
|
+
zoom_bbox: any;
|
|
25
|
+
rotate: number;
|
|
26
26
|
|
|
27
27
|
constructor(item: any) {
|
|
28
28
|
super();
|
|
@@ -35,125 +35,20 @@ export default class BlockModel extends ModelBase {
|
|
|
35
35
|
this.color = item.color || "#f1f1f1";
|
|
36
36
|
this.border_color = item.border_color || "#f1f1f1";
|
|
37
37
|
this.title = item.title;
|
|
38
|
+
this.rotate = item.rotate || 0;
|
|
38
39
|
|
|
39
40
|
this.labels = item.labels.map((item: any) => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
item.block = this;
|
|
42
|
+
return new LabelModel(item);
|
|
43
|
+
}) || [];
|
|
43
44
|
|
|
44
45
|
this.seats = item.seats.map((item: any) => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
item.block = this;
|
|
47
|
+
let seat: SeatModel = new SeatModel(item);
|
|
48
|
+
return seat;
|
|
49
|
+
}) || [];
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
get seats(): Array<SeatModel> {
|
|
52
|
-
return this._seats;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
set seats(value: Array<SeatModel>) {
|
|
56
|
-
this._seats = value;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
get labels(): Array<LabelModel> {
|
|
60
|
-
return this._labels;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
set labels(value: Array<LabelModel>) {
|
|
64
|
-
this._labels = value;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
get title(): String {
|
|
68
|
-
return this._title;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
set title(value: String) {
|
|
72
|
-
this._title = value;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
get bounds(): any {
|
|
76
|
-
return this._bounds;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
set bounds(value: any) {
|
|
80
|
-
this._bounds = value;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
get width(): number {
|
|
84
|
-
return this._width;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
set width(value: number) {
|
|
88
|
-
this._width = value;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
get height(): number {
|
|
92
|
-
return this._height;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
set height(value: number) {
|
|
96
|
-
this._height = value;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
get x(): number {
|
|
100
|
-
return this._x;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
set x(value: number) {
|
|
104
|
-
this._x = value;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
get y(): number {
|
|
108
|
-
return this._y;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
set y(value: number) {
|
|
112
|
-
this._y = value;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
get id(): string {
|
|
116
|
-
return this._id;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
set id(value: string) {
|
|
120
|
-
this._id = value;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
get color(): string {
|
|
124
|
-
return this._color;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
set color(value: string) {
|
|
128
|
-
this._color = value;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
get border_color(): string {
|
|
133
|
-
return this._border_color;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
set border_color(value: string) {
|
|
137
|
-
this._border_color = value;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
get bbox(): any {
|
|
142
|
-
return this._bbox;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
set bbox(value: any) {
|
|
146
|
-
this._bbox = value;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
get zoom_bbox(): any {
|
|
151
|
-
return this._zoom_bbox;
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
set zoom_bbox(value: any) {
|
|
155
|
-
this._zoom_bbox = value;
|
|
156
|
-
}
|
|
157
52
|
|
|
158
53
|
toJson() {
|
|
159
54
|
return {
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
3
|
-
* https://github.com/seatmap/canvas Copyright 2018 Ali Sait TEKE
|
|
2
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
3
|
*/
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
export class CoordinateModel {
|
|
8
7
|
|
|
9
|
-
private
|
|
10
|
-
private
|
|
8
|
+
private x: number;
|
|
9
|
+
private y: number;
|
|
11
10
|
|
|
12
11
|
constructor(item?: any) {
|
|
13
12
|
this.x = item.x || 0;
|
|
@@ -19,22 +18,6 @@ export class CoordinateModel {
|
|
|
19
18
|
}
|
|
20
19
|
|
|
21
20
|
|
|
22
|
-
get x(): number {
|
|
23
|
-
return this._x;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
set x(value: number) {
|
|
27
|
-
this._x = value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
get y(): number {
|
|
31
|
-
return this._y;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
set y(value: number) {
|
|
35
|
-
this._y = value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
21
|
toJson() {
|
|
39
22
|
return {}
|
|
40
23
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -10,13 +10,14 @@ import EventManager from "../svg/event.manager";
|
|
|
10
10
|
import {SeatMapCanvas} from "../canvas.index";
|
|
11
11
|
import {SeatItem} from "../svg/stage/blocks/block-item/seat/seat-item.index";
|
|
12
12
|
import SeatModel from "./seat.model";
|
|
13
|
+
import Block from "../svg/stage/blocks/block-item/block-item.index";
|
|
13
14
|
|
|
14
15
|
interface BlockQuery {
|
|
15
16
|
id?: number | string
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export default class DataModel {
|
|
19
|
-
|
|
20
|
+
blocks: Array<BlockModel>;
|
|
20
21
|
|
|
21
22
|
|
|
22
23
|
private eventManager: EventManager;
|
|
@@ -37,6 +38,7 @@ export default class DataModel {
|
|
|
37
38
|
|
|
38
39
|
public addBulkBlock(block_data: Array<BlockModel>): this {
|
|
39
40
|
block_data.map((item: any) => {
|
|
41
|
+
console.log('item',item)
|
|
40
42
|
this.blocks.push(new BlockModel(item));
|
|
41
43
|
});
|
|
42
44
|
this.eventManager.dispatch(EventType.ADD_BLOCK, [block_data]);
|
|
@@ -50,13 +52,25 @@ export default class DataModel {
|
|
|
50
52
|
return this;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
public getBlock(id: string | number): BlockModel {
|
|
54
|
-
|
|
55
|
+
public getBlock(id: string | number): BlockModel | null {
|
|
56
|
+
const block = this.blocks.find((item: BlockModel) => item.id === id)
|
|
57
|
+
if (block) {
|
|
58
|
+
return block
|
|
59
|
+
} else {
|
|
60
|
+
return null
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
public getBlocks(blockId?: string): Array<BlockModel> {
|
|
58
|
-
if (blockId)
|
|
59
|
-
|
|
65
|
+
if (blockId) {
|
|
66
|
+
const block = this.getBlock(blockId)
|
|
67
|
+
if (block) {
|
|
68
|
+
return [block];
|
|
69
|
+
} else {
|
|
70
|
+
return []
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
}
|
|
60
74
|
return this.blocks;
|
|
61
75
|
}
|
|
62
76
|
|
|
@@ -69,13 +83,19 @@ export default class DataModel {
|
|
|
69
83
|
return this;
|
|
70
84
|
}
|
|
71
85
|
|
|
72
|
-
public getSeat(seatId: string | number, blockId: string | number): SeatModel {
|
|
73
|
-
let block: BlockModel = this.getBlock(blockId);
|
|
86
|
+
public getSeat(seatId: string | number, blockId: string | number): SeatModel | null {
|
|
87
|
+
let block: BlockModel = this.getBlock(blockId) as BlockModel;
|
|
74
88
|
if (block) {
|
|
75
|
-
|
|
89
|
+
const seat = block.seats.find(seat => seat.id == seatId)
|
|
90
|
+
if (seat)
|
|
91
|
+
return seat
|
|
92
|
+
else {
|
|
93
|
+
return null
|
|
94
|
+
}
|
|
76
95
|
} else {
|
|
77
96
|
console.error(new Error('Block not found!'));
|
|
78
97
|
new Error('Block not found')
|
|
98
|
+
return null;
|
|
79
99
|
}
|
|
80
100
|
|
|
81
101
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,7 +14,7 @@ export default class DefaultsModel {
|
|
|
14
14
|
container: any = null;
|
|
15
15
|
zoom_focus_circle_radius: number = 60;
|
|
16
16
|
click_enable_sold_seats: boolean = false;
|
|
17
|
-
zoom_out_button: string
|
|
17
|
+
zoom_out_button: string;
|
|
18
18
|
legend_show: boolean = false;
|
|
19
19
|
canvas_stageout_control: boolean = true;
|
|
20
20
|
seat_style: {
|
|
@@ -25,7 +25,9 @@ export default class DefaultsModel {
|
|
|
25
25
|
hover: string,
|
|
26
26
|
focus: string,
|
|
27
27
|
focus_out: string,
|
|
28
|
-
check_color: string
|
|
28
|
+
check_color: string,
|
|
29
|
+
check_icon: string | null,
|
|
30
|
+
check_icon_color: string,
|
|
29
31
|
};
|
|
30
32
|
block_style: {
|
|
31
33
|
fill: string
|
|
@@ -38,7 +40,8 @@ export default class DefaultsModel {
|
|
|
38
40
|
legend_style: {
|
|
39
41
|
radius: number,
|
|
40
42
|
padding: number,
|
|
41
|
-
font_size: number
|
|
43
|
+
font_size: number,
|
|
44
|
+
font_color: string
|
|
42
45
|
};
|
|
43
46
|
|
|
44
47
|
label_style: {
|
|
@@ -83,6 +86,8 @@ export default class DefaultsModel {
|
|
|
83
86
|
focus: config.seat_style && config.seat_style.focus || "#6293d2",
|
|
84
87
|
focus_out: config.seat_style && config.seat_style.focus_out || "#ff001c",
|
|
85
88
|
check_color: config.seat_style && config.seat_style.check_color || "#ffffff",
|
|
89
|
+
check_icon: null,
|
|
90
|
+
check_icon_color: config.seat_style && config.seat_style.check_icon_color || "#ffffff",
|
|
86
91
|
};
|
|
87
92
|
this.block_style = {
|
|
88
93
|
fill: config.block_style && config.block_style.fill || "#ffffff",
|
|
@@ -101,6 +106,7 @@ export default class DefaultsModel {
|
|
|
101
106
|
radius: config.legend_style && config.legend_style.radius || 12,
|
|
102
107
|
padding: config.legend_style && config.legend_style.padding || 36,
|
|
103
108
|
font_size: config.legend_style && config.legend_style.font_size || 100,
|
|
109
|
+
font_color: config.legend_style && config.legend_style.font_color || "#000000",
|
|
104
110
|
};
|
|
105
111
|
this.tooltip_style = {
|
|
106
112
|
border_width: config.tooltip_style && config.tooltip_style.border_width || 1,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
@@ -9,11 +9,11 @@ import BlockModel from "./block.model";
|
|
|
9
9
|
import ModelBase from "./model.base";
|
|
10
10
|
|
|
11
11
|
export default class LabelModel extends ModelBase {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
title: string;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
block: BlockModel;
|
|
17
17
|
|
|
18
18
|
constructor(item: any) {
|
|
19
19
|
super();
|
|
@@ -22,37 +22,4 @@ export default class LabelModel extends ModelBase {
|
|
|
22
22
|
this.title = item.title;
|
|
23
23
|
this.block = item.block;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
get x(): number {
|
|
28
|
-
return this._x;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
set x(value: number) {
|
|
32
|
-
this._x = value;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
get y(): number {
|
|
36
|
-
return this._y;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
set y(value: number) {
|
|
40
|
-
this._y = value;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get title(): string {
|
|
44
|
-
return this._title;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
set title(value: string) {
|
|
48
|
-
this._title = value;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
get block(): BlockModel {
|
|
52
|
-
return this._block;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
set block(value: BlockModel) {
|
|
56
|
-
this._block = value;
|
|
57
|
-
}
|
|
58
25
|
}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
import ModelBase from "./model.base";
|
|
9
8
|
|
|
10
9
|
export default class LegendModel extends ModelBase {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
title: string;
|
|
13
|
+
color: string;
|
|
15
14
|
|
|
16
15
|
|
|
17
16
|
constructor(item: any) {
|
|
@@ -19,38 +18,7 @@ export default class LegendModel extends ModelBase {
|
|
|
19
18
|
this.x = item.x;
|
|
20
19
|
this.y = item.y;
|
|
21
20
|
this.title = item.title;
|
|
21
|
+
this.color = item.color;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
get x(): number {
|
|
26
|
-
return this._x;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set x(value: number) {
|
|
30
|
-
this._x = value;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
get y(): number {
|
|
34
|
-
return this._y;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
set y(value: number) {
|
|
38
|
-
this._y = value;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
get title(): string {
|
|
42
|
-
return this._title;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
set title(value: string) {
|
|
46
|
-
this._title = value;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
get color(): string {
|
|
50
|
-
return this._color;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
set color(value: string) {
|
|
54
|
-
this._color = value;
|
|
55
|
-
}
|
|
56
24
|
}
|
|
@@ -1,32 +1,15 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* $project.fileName
|
|
3
|
-
* https://github.com/seatmap
|
|
3
|
+
* https://github.com/alisaitteke/seatmap-canvas Copyright 2023 Ali Sait TEKE
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export default class ModelBase {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
child_index: number | null;
|
|
8
|
+
item_type: string | null;
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
constructor() {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
get child_index(): number {
|
|
17
|
-
return this._child_index;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
set child_index(value: number) {
|
|
21
|
-
this._child_index = value;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
get item_type(): string {
|
|
26
|
-
return this._item_type;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set item_type(value: string) {
|
|
30
|
-
this._item_type = value;
|
|
12
|
+
this.child_index = null;
|
|
13
|
+
this.item_type = null
|
|
31
14
|
}
|
|
32
15
|
}
|