microboard-temp 0.4.85 → 0.4.86
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/cjs/browser.js +13 -13
- package/dist/cjs/index.js +13 -13
- package/dist/cjs/node.js +13 -13
- package/dist/esm/browser.js +13 -13
- package/dist/esm/index.js +13 -13
- package/dist/esm/node.js +13 -13
- package/dist/types/Items/Examples/CardGame/{Hand/AddHand.d.ts → Screen/AddScreen.d.ts} +1 -1
- package/dist/types/Items/Examples/CardGame/{Hand/Hand.d.ts → Screen/Screen.d.ts} +5 -5
- package/dist/types/Items/Examples/CardGame/{Hand/HandOperation.d.ts → Screen/ScreenOperation.d.ts} +4 -4
- package/dist/types/Items/Examples/CardGame/Screen/index.d.ts +1 -0
- package/dist/types/Items/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/types/Items/Examples/CardGame/Hand/index.d.ts +0 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -705,6 +705,7 @@ __export(exports_browser, {
|
|
|
705
705
|
Shape: () => Shape,
|
|
706
706
|
SessionStorage: () => SessionStorage,
|
|
707
707
|
Selection: () => BoardSelection,
|
|
708
|
+
Screen: () => Screen,
|
|
708
709
|
STEP_STROKE_WIDTH: () => STEP_STROKE_WIDTH,
|
|
709
710
|
SHAPE_LAST_TYPE_KEY: () => SHAPE_LAST_TYPE_KEY,
|
|
710
711
|
SHAPES_CATEGORIES: () => SHAPES_CATEGORIES,
|
|
@@ -729,7 +730,6 @@ __export(exports_browser, {
|
|
|
729
730
|
Keyboard: () => Keyboard,
|
|
730
731
|
Items: () => Items,
|
|
731
732
|
ImageItem: () => ImageItem,
|
|
732
|
-
Hand: () => Hand,
|
|
733
733
|
Group: () => Group,
|
|
734
734
|
Frames: () => Frames,
|
|
735
735
|
FrameCommand: () => FrameCommand,
|
|
@@ -48327,10 +48327,10 @@ registerItem({
|
|
|
48327
48327
|
defaultData: defaultDiceData,
|
|
48328
48328
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48329
48329
|
});
|
|
48330
|
-
// src/Items/Examples/CardGame/
|
|
48331
|
-
class
|
|
48330
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48331
|
+
class AddScreen extends ShapeTool {
|
|
48332
48332
|
constructor(board, name) {
|
|
48333
|
-
super(board, name,
|
|
48333
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48334
48334
|
}
|
|
48335
48335
|
pointerUp() {
|
|
48336
48336
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48338,26 +48338,26 @@ class AddHand extends ShapeTool {
|
|
|
48338
48338
|
}
|
|
48339
48339
|
}
|
|
48340
48340
|
|
|
48341
|
-
// src/Items/Examples/CardGame/
|
|
48341
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48342
48342
|
var handPath = new Path([
|
|
48343
48343
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48344
48344
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48345
48345
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48346
48346
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48347
48347
|
], true, "#FFFFFF", "#000000");
|
|
48348
|
-
var
|
|
48349
|
-
itemType: "
|
|
48348
|
+
var defaultScreenData = {
|
|
48349
|
+
itemType: "Screen",
|
|
48350
48350
|
ownerId: ""
|
|
48351
48351
|
};
|
|
48352
48352
|
|
|
48353
|
-
class
|
|
48353
|
+
class Screen extends BaseItem {
|
|
48354
48354
|
ownerId;
|
|
48355
48355
|
subject = new Subject;
|
|
48356
48356
|
path;
|
|
48357
48357
|
borderWidth = 1;
|
|
48358
48358
|
backgroundColor = "#FFFFFF";
|
|
48359
48359
|
constructor(board, id = "", ownerId = "") {
|
|
48360
|
-
super(board, id,
|
|
48360
|
+
super(board, id, defaultScreenData, true);
|
|
48361
48361
|
this.ownerId = ownerId;
|
|
48362
48362
|
this.transformation.subject.subscribe(() => {
|
|
48363
48363
|
this.transformPath();
|
|
@@ -48370,7 +48370,7 @@ class Hand extends BaseItem {
|
|
|
48370
48370
|
apply(op) {
|
|
48371
48371
|
super.apply(op);
|
|
48372
48372
|
switch (op.class) {
|
|
48373
|
-
case "
|
|
48373
|
+
case "Screen":
|
|
48374
48374
|
switch (op.method) {
|
|
48375
48375
|
case "setBorderWidth":
|
|
48376
48376
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48471,9 +48471,9 @@ class Hand extends BaseItem {
|
|
|
48471
48471
|
}
|
|
48472
48472
|
}
|
|
48473
48473
|
registerItem({
|
|
48474
|
-
item:
|
|
48475
|
-
defaultData:
|
|
48476
|
-
toolData: { name: "
|
|
48474
|
+
item: Screen,
|
|
48475
|
+
defaultData: defaultScreenData,
|
|
48476
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48477
48477
|
});
|
|
48478
48478
|
// src/Pointer/Cursor.ts
|
|
48479
48479
|
var defaultCursors = [
|
package/dist/cjs/index.js
CHANGED
|
@@ -705,6 +705,7 @@ __export(exports_src, {
|
|
|
705
705
|
Shape: () => Shape,
|
|
706
706
|
SessionStorage: () => SessionStorage,
|
|
707
707
|
Selection: () => BoardSelection,
|
|
708
|
+
Screen: () => Screen,
|
|
708
709
|
STEP_STROKE_WIDTH: () => STEP_STROKE_WIDTH,
|
|
709
710
|
SHAPE_LAST_TYPE_KEY: () => SHAPE_LAST_TYPE_KEY,
|
|
710
711
|
SHAPES_CATEGORIES: () => SHAPES_CATEGORIES,
|
|
@@ -729,7 +730,6 @@ __export(exports_src, {
|
|
|
729
730
|
Keyboard: () => Keyboard,
|
|
730
731
|
Items: () => Items,
|
|
731
732
|
ImageItem: () => ImageItem,
|
|
732
|
-
Hand: () => Hand,
|
|
733
733
|
Group: () => Group,
|
|
734
734
|
Frames: () => Frames,
|
|
735
735
|
FrameCommand: () => FrameCommand,
|
|
@@ -48327,10 +48327,10 @@ registerItem({
|
|
|
48327
48327
|
defaultData: defaultDiceData,
|
|
48328
48328
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48329
48329
|
});
|
|
48330
|
-
// src/Items/Examples/CardGame/
|
|
48331
|
-
class
|
|
48330
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48331
|
+
class AddScreen extends ShapeTool {
|
|
48332
48332
|
constructor(board, name) {
|
|
48333
|
-
super(board, name,
|
|
48333
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48334
48334
|
}
|
|
48335
48335
|
pointerUp() {
|
|
48336
48336
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48338,26 +48338,26 @@ class AddHand extends ShapeTool {
|
|
|
48338
48338
|
}
|
|
48339
48339
|
}
|
|
48340
48340
|
|
|
48341
|
-
// src/Items/Examples/CardGame/
|
|
48341
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48342
48342
|
var handPath = new Path([
|
|
48343
48343
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48344
48344
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48345
48345
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48346
48346
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48347
48347
|
], true, "#FFFFFF", "#000000");
|
|
48348
|
-
var
|
|
48349
|
-
itemType: "
|
|
48348
|
+
var defaultScreenData = {
|
|
48349
|
+
itemType: "Screen",
|
|
48350
48350
|
ownerId: ""
|
|
48351
48351
|
};
|
|
48352
48352
|
|
|
48353
|
-
class
|
|
48353
|
+
class Screen extends BaseItem {
|
|
48354
48354
|
ownerId;
|
|
48355
48355
|
subject = new Subject;
|
|
48356
48356
|
path;
|
|
48357
48357
|
borderWidth = 1;
|
|
48358
48358
|
backgroundColor = "#FFFFFF";
|
|
48359
48359
|
constructor(board, id = "", ownerId = "") {
|
|
48360
|
-
super(board, id,
|
|
48360
|
+
super(board, id, defaultScreenData, true);
|
|
48361
48361
|
this.ownerId = ownerId;
|
|
48362
48362
|
this.transformation.subject.subscribe(() => {
|
|
48363
48363
|
this.transformPath();
|
|
@@ -48370,7 +48370,7 @@ class Hand extends BaseItem {
|
|
|
48370
48370
|
apply(op) {
|
|
48371
48371
|
super.apply(op);
|
|
48372
48372
|
switch (op.class) {
|
|
48373
|
-
case "
|
|
48373
|
+
case "Screen":
|
|
48374
48374
|
switch (op.method) {
|
|
48375
48375
|
case "setBorderWidth":
|
|
48376
48376
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48471,9 +48471,9 @@ class Hand extends BaseItem {
|
|
|
48471
48471
|
}
|
|
48472
48472
|
}
|
|
48473
48473
|
registerItem({
|
|
48474
|
-
item:
|
|
48475
|
-
defaultData:
|
|
48476
|
-
toolData: { name: "
|
|
48474
|
+
item: Screen,
|
|
48475
|
+
defaultData: defaultScreenData,
|
|
48476
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48477
48477
|
});
|
|
48478
48478
|
// src/Pointer/Cursor.ts
|
|
48479
48479
|
var defaultCursors = [
|
package/dist/cjs/node.js
CHANGED
|
@@ -1742,6 +1742,7 @@ __export(exports_node, {
|
|
|
1742
1742
|
Shape: () => Shape,
|
|
1743
1743
|
SessionStorage: () => SessionStorage,
|
|
1744
1744
|
Selection: () => BoardSelection,
|
|
1745
|
+
Screen: () => Screen,
|
|
1745
1746
|
STEP_STROKE_WIDTH: () => STEP_STROKE_WIDTH,
|
|
1746
1747
|
SHAPE_LAST_TYPE_KEY: () => SHAPE_LAST_TYPE_KEY,
|
|
1747
1748
|
SHAPES_CATEGORIES: () => SHAPES_CATEGORIES,
|
|
@@ -1766,7 +1767,6 @@ __export(exports_node, {
|
|
|
1766
1767
|
Keyboard: () => Keyboard,
|
|
1767
1768
|
Items: () => Items,
|
|
1768
1769
|
ImageItem: () => ImageItem,
|
|
1769
|
-
Hand: () => Hand,
|
|
1770
1770
|
Group: () => Group,
|
|
1771
1771
|
Frames: () => Frames,
|
|
1772
1772
|
FrameCommand: () => FrameCommand,
|
|
@@ -50800,10 +50800,10 @@ registerItem({
|
|
|
50800
50800
|
defaultData: defaultDiceData,
|
|
50801
50801
|
toolData: { name: "AddDice", tool: AddDice }
|
|
50802
50802
|
});
|
|
50803
|
-
// src/Items/Examples/CardGame/
|
|
50804
|
-
class
|
|
50803
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
50804
|
+
class AddScreen extends ShapeTool {
|
|
50805
50805
|
constructor(board, name) {
|
|
50806
|
-
super(board, name,
|
|
50806
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
50807
50807
|
}
|
|
50808
50808
|
pointerUp() {
|
|
50809
50809
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -50811,26 +50811,26 @@ class AddHand extends ShapeTool {
|
|
|
50811
50811
|
}
|
|
50812
50812
|
}
|
|
50813
50813
|
|
|
50814
|
-
// src/Items/Examples/CardGame/
|
|
50814
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
50815
50815
|
var handPath = new Path([
|
|
50816
50816
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
50817
50817
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
50818
50818
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
50819
50819
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
50820
50820
|
], true, "#FFFFFF", "#000000");
|
|
50821
|
-
var
|
|
50822
|
-
itemType: "
|
|
50821
|
+
var defaultScreenData = {
|
|
50822
|
+
itemType: "Screen",
|
|
50823
50823
|
ownerId: ""
|
|
50824
50824
|
};
|
|
50825
50825
|
|
|
50826
|
-
class
|
|
50826
|
+
class Screen extends BaseItem {
|
|
50827
50827
|
ownerId;
|
|
50828
50828
|
subject = new Subject;
|
|
50829
50829
|
path;
|
|
50830
50830
|
borderWidth = 1;
|
|
50831
50831
|
backgroundColor = "#FFFFFF";
|
|
50832
50832
|
constructor(board, id = "", ownerId = "") {
|
|
50833
|
-
super(board, id,
|
|
50833
|
+
super(board, id, defaultScreenData, true);
|
|
50834
50834
|
this.ownerId = ownerId;
|
|
50835
50835
|
this.transformation.subject.subscribe(() => {
|
|
50836
50836
|
this.transformPath();
|
|
@@ -50843,7 +50843,7 @@ class Hand extends BaseItem {
|
|
|
50843
50843
|
apply(op) {
|
|
50844
50844
|
super.apply(op);
|
|
50845
50845
|
switch (op.class) {
|
|
50846
|
-
case "
|
|
50846
|
+
case "Screen":
|
|
50847
50847
|
switch (op.method) {
|
|
50848
50848
|
case "setBorderWidth":
|
|
50849
50849
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -50944,9 +50944,9 @@ class Hand extends BaseItem {
|
|
|
50944
50944
|
}
|
|
50945
50945
|
}
|
|
50946
50946
|
registerItem({
|
|
50947
|
-
item:
|
|
50948
|
-
defaultData:
|
|
50949
|
-
toolData: { name: "
|
|
50947
|
+
item: Screen,
|
|
50948
|
+
defaultData: defaultScreenData,
|
|
50949
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
50950
50950
|
});
|
|
50951
50951
|
// src/Pointer/Cursor.ts
|
|
50952
50952
|
var defaultCursors = [
|
package/dist/esm/browser.js
CHANGED
|
@@ -48176,10 +48176,10 @@ registerItem({
|
|
|
48176
48176
|
defaultData: defaultDiceData,
|
|
48177
48177
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48178
48178
|
});
|
|
48179
|
-
// src/Items/Examples/CardGame/
|
|
48180
|
-
class
|
|
48179
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48180
|
+
class AddScreen extends ShapeTool {
|
|
48181
48181
|
constructor(board, name) {
|
|
48182
|
-
super(board, name,
|
|
48182
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48183
48183
|
}
|
|
48184
48184
|
pointerUp() {
|
|
48185
48185
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48187,26 +48187,26 @@ class AddHand extends ShapeTool {
|
|
|
48187
48187
|
}
|
|
48188
48188
|
}
|
|
48189
48189
|
|
|
48190
|
-
// src/Items/Examples/CardGame/
|
|
48190
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48191
48191
|
var handPath = new Path([
|
|
48192
48192
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48193
48193
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48194
48194
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48195
48195
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48196
48196
|
], true, "#FFFFFF", "#000000");
|
|
48197
|
-
var
|
|
48198
|
-
itemType: "
|
|
48197
|
+
var defaultScreenData = {
|
|
48198
|
+
itemType: "Screen",
|
|
48199
48199
|
ownerId: ""
|
|
48200
48200
|
};
|
|
48201
48201
|
|
|
48202
|
-
class
|
|
48202
|
+
class Screen extends BaseItem {
|
|
48203
48203
|
ownerId;
|
|
48204
48204
|
subject = new Subject;
|
|
48205
48205
|
path;
|
|
48206
48206
|
borderWidth = 1;
|
|
48207
48207
|
backgroundColor = "#FFFFFF";
|
|
48208
48208
|
constructor(board, id = "", ownerId = "") {
|
|
48209
|
-
super(board, id,
|
|
48209
|
+
super(board, id, defaultScreenData, true);
|
|
48210
48210
|
this.ownerId = ownerId;
|
|
48211
48211
|
this.transformation.subject.subscribe(() => {
|
|
48212
48212
|
this.transformPath();
|
|
@@ -48219,7 +48219,7 @@ class Hand extends BaseItem {
|
|
|
48219
48219
|
apply(op) {
|
|
48220
48220
|
super.apply(op);
|
|
48221
48221
|
switch (op.class) {
|
|
48222
|
-
case "
|
|
48222
|
+
case "Screen":
|
|
48223
48223
|
switch (op.method) {
|
|
48224
48224
|
case "setBorderWidth":
|
|
48225
48225
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48320,9 +48320,9 @@ class Hand extends BaseItem {
|
|
|
48320
48320
|
}
|
|
48321
48321
|
}
|
|
48322
48322
|
registerItem({
|
|
48323
|
-
item:
|
|
48324
|
-
defaultData:
|
|
48325
|
-
toolData: { name: "
|
|
48323
|
+
item: Screen,
|
|
48324
|
+
defaultData: defaultScreenData,
|
|
48325
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48326
48326
|
});
|
|
48327
48327
|
// src/Pointer/Cursor.ts
|
|
48328
48328
|
var defaultCursors = [
|
|
@@ -56829,6 +56829,7 @@ export {
|
|
|
56829
56829
|
Shape,
|
|
56830
56830
|
SessionStorage,
|
|
56831
56831
|
BoardSelection as Selection,
|
|
56832
|
+
Screen,
|
|
56832
56833
|
STEP_STROKE_WIDTH,
|
|
56833
56834
|
SHAPE_LAST_TYPE_KEY,
|
|
56834
56835
|
SHAPES_CATEGORIES,
|
|
@@ -56853,7 +56854,6 @@ export {
|
|
|
56853
56854
|
Keyboard,
|
|
56854
56855
|
Items,
|
|
56855
56856
|
ImageItem,
|
|
56856
|
-
Hand,
|
|
56857
56857
|
Group,
|
|
56858
56858
|
Frames,
|
|
56859
56859
|
FrameCommand,
|
package/dist/esm/index.js
CHANGED
|
@@ -48169,10 +48169,10 @@ registerItem({
|
|
|
48169
48169
|
defaultData: defaultDiceData,
|
|
48170
48170
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48171
48171
|
});
|
|
48172
|
-
// src/Items/Examples/CardGame/
|
|
48173
|
-
class
|
|
48172
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48173
|
+
class AddScreen extends ShapeTool {
|
|
48174
48174
|
constructor(board, name) {
|
|
48175
|
-
super(board, name,
|
|
48175
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48176
48176
|
}
|
|
48177
48177
|
pointerUp() {
|
|
48178
48178
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48180,26 +48180,26 @@ class AddHand extends ShapeTool {
|
|
|
48180
48180
|
}
|
|
48181
48181
|
}
|
|
48182
48182
|
|
|
48183
|
-
// src/Items/Examples/CardGame/
|
|
48183
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48184
48184
|
var handPath = new Path([
|
|
48185
48185
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48186
48186
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48187
48187
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48188
48188
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48189
48189
|
], true, "#FFFFFF", "#000000");
|
|
48190
|
-
var
|
|
48191
|
-
itemType: "
|
|
48190
|
+
var defaultScreenData = {
|
|
48191
|
+
itemType: "Screen",
|
|
48192
48192
|
ownerId: ""
|
|
48193
48193
|
};
|
|
48194
48194
|
|
|
48195
|
-
class
|
|
48195
|
+
class Screen extends BaseItem {
|
|
48196
48196
|
ownerId;
|
|
48197
48197
|
subject = new Subject;
|
|
48198
48198
|
path;
|
|
48199
48199
|
borderWidth = 1;
|
|
48200
48200
|
backgroundColor = "#FFFFFF";
|
|
48201
48201
|
constructor(board, id = "", ownerId = "") {
|
|
48202
|
-
super(board, id,
|
|
48202
|
+
super(board, id, defaultScreenData, true);
|
|
48203
48203
|
this.ownerId = ownerId;
|
|
48204
48204
|
this.transformation.subject.subscribe(() => {
|
|
48205
48205
|
this.transformPath();
|
|
@@ -48212,7 +48212,7 @@ class Hand extends BaseItem {
|
|
|
48212
48212
|
apply(op) {
|
|
48213
48213
|
super.apply(op);
|
|
48214
48214
|
switch (op.class) {
|
|
48215
|
-
case "
|
|
48215
|
+
case "Screen":
|
|
48216
48216
|
switch (op.method) {
|
|
48217
48217
|
case "setBorderWidth":
|
|
48218
48218
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48313,9 +48313,9 @@ class Hand extends BaseItem {
|
|
|
48313
48313
|
}
|
|
48314
48314
|
}
|
|
48315
48315
|
registerItem({
|
|
48316
|
-
item:
|
|
48317
|
-
defaultData:
|
|
48318
|
-
toolData: { name: "
|
|
48316
|
+
item: Screen,
|
|
48317
|
+
defaultData: defaultScreenData,
|
|
48318
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48319
48319
|
});
|
|
48320
48320
|
// src/Pointer/Cursor.ts
|
|
48321
48321
|
var defaultCursors = [
|
|
@@ -56727,6 +56727,7 @@ export {
|
|
|
56727
56727
|
Shape,
|
|
56728
56728
|
SessionStorage,
|
|
56729
56729
|
BoardSelection as Selection,
|
|
56730
|
+
Screen,
|
|
56730
56731
|
STEP_STROKE_WIDTH,
|
|
56731
56732
|
SHAPE_LAST_TYPE_KEY,
|
|
56732
56733
|
SHAPES_CATEGORIES,
|
|
@@ -56751,7 +56752,6 @@ export {
|
|
|
56751
56752
|
Keyboard,
|
|
56752
56753
|
Items,
|
|
56753
56754
|
ImageItem,
|
|
56754
|
-
Hand,
|
|
56755
56755
|
Group,
|
|
56756
56756
|
Frames,
|
|
56757
56757
|
FrameCommand,
|
package/dist/esm/node.js
CHANGED
|
@@ -50637,10 +50637,10 @@ registerItem({
|
|
|
50637
50637
|
defaultData: defaultDiceData,
|
|
50638
50638
|
toolData: { name: "AddDice", tool: AddDice }
|
|
50639
50639
|
});
|
|
50640
|
-
// src/Items/Examples/CardGame/
|
|
50641
|
-
class
|
|
50640
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
50641
|
+
class AddScreen extends ShapeTool {
|
|
50642
50642
|
constructor(board, name) {
|
|
50643
|
-
super(board, name,
|
|
50643
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
50644
50644
|
}
|
|
50645
50645
|
pointerUp() {
|
|
50646
50646
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -50648,26 +50648,26 @@ class AddHand extends ShapeTool {
|
|
|
50648
50648
|
}
|
|
50649
50649
|
}
|
|
50650
50650
|
|
|
50651
|
-
// src/Items/Examples/CardGame/
|
|
50651
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
50652
50652
|
var handPath = new Path([
|
|
50653
50653
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
50654
50654
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
50655
50655
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
50656
50656
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
50657
50657
|
], true, "#FFFFFF", "#000000");
|
|
50658
|
-
var
|
|
50659
|
-
itemType: "
|
|
50658
|
+
var defaultScreenData = {
|
|
50659
|
+
itemType: "Screen",
|
|
50660
50660
|
ownerId: ""
|
|
50661
50661
|
};
|
|
50662
50662
|
|
|
50663
|
-
class
|
|
50663
|
+
class Screen extends BaseItem {
|
|
50664
50664
|
ownerId;
|
|
50665
50665
|
subject = new Subject;
|
|
50666
50666
|
path;
|
|
50667
50667
|
borderWidth = 1;
|
|
50668
50668
|
backgroundColor = "#FFFFFF";
|
|
50669
50669
|
constructor(board, id = "", ownerId = "") {
|
|
50670
|
-
super(board, id,
|
|
50670
|
+
super(board, id, defaultScreenData, true);
|
|
50671
50671
|
this.ownerId = ownerId;
|
|
50672
50672
|
this.transformation.subject.subscribe(() => {
|
|
50673
50673
|
this.transformPath();
|
|
@@ -50680,7 +50680,7 @@ class Hand extends BaseItem {
|
|
|
50680
50680
|
apply(op) {
|
|
50681
50681
|
super.apply(op);
|
|
50682
50682
|
switch (op.class) {
|
|
50683
|
-
case "
|
|
50683
|
+
case "Screen":
|
|
50684
50684
|
switch (op.method) {
|
|
50685
50685
|
case "setBorderWidth":
|
|
50686
50686
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -50781,9 +50781,9 @@ class Hand extends BaseItem {
|
|
|
50781
50781
|
}
|
|
50782
50782
|
}
|
|
50783
50783
|
registerItem({
|
|
50784
|
-
item:
|
|
50785
|
-
defaultData:
|
|
50786
|
-
toolData: { name: "
|
|
50784
|
+
item: Screen,
|
|
50785
|
+
defaultData: defaultScreenData,
|
|
50786
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
50787
50787
|
});
|
|
50788
50788
|
// src/Pointer/Cursor.ts
|
|
50789
50789
|
var defaultCursors = [
|
|
@@ -59362,6 +59362,7 @@ export {
|
|
|
59362
59362
|
Shape,
|
|
59363
59363
|
SessionStorage,
|
|
59364
59364
|
BoardSelection as Selection,
|
|
59365
|
+
Screen,
|
|
59365
59366
|
STEP_STROKE_WIDTH,
|
|
59366
59367
|
SHAPE_LAST_TYPE_KEY,
|
|
59367
59368
|
SHAPES_CATEGORIES,
|
|
@@ -59386,7 +59387,6 @@ export {
|
|
|
59386
59387
|
Keyboard,
|
|
59387
59388
|
Items,
|
|
59388
59389
|
ImageItem,
|
|
59389
|
-
Hand,
|
|
59390
59390
|
Group,
|
|
59391
59391
|
Frames,
|
|
59392
59392
|
FrameCommand,
|
|
@@ -3,16 +3,16 @@ import { Board } from "Board";
|
|
|
3
3
|
import { Subject } from "Subject";
|
|
4
4
|
import { DrawingContext } from "Items/DrawingContext";
|
|
5
5
|
import { BorderWidth } from "../../../Path";
|
|
6
|
-
import {
|
|
7
|
-
export declare const
|
|
8
|
-
export declare class
|
|
6
|
+
import { ScreenOperation } from "./ScreenOperation";
|
|
7
|
+
export declare const defaultScreenData: BaseItemData;
|
|
8
|
+
export declare class Screen extends BaseItem {
|
|
9
9
|
private ownerId;
|
|
10
|
-
readonly subject: Subject<
|
|
10
|
+
readonly subject: Subject<Screen>;
|
|
11
11
|
private path;
|
|
12
12
|
private borderWidth;
|
|
13
13
|
backgroundColor: string;
|
|
14
14
|
constructor(board: Board, id?: string, ownerId?: string);
|
|
15
|
-
apply(op:
|
|
15
|
+
apply(op: ScreenOperation): void;
|
|
16
16
|
getBackgroundColor(): string;
|
|
17
17
|
getBorderStyle(): string;
|
|
18
18
|
getStrokeColor(): string;
|
package/dist/types/Items/Examples/CardGame/{Hand/HandOperation.d.ts → Screen/ScreenOperation.d.ts}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { BaseOperation } from "Events/EventsOperations";
|
|
2
|
-
export type
|
|
2
|
+
export type ScreenOperation = SetBackgroundColor | SetBorderColor | SetBorderWidth;
|
|
3
3
|
interface SetBackgroundColor extends BaseOperation<{
|
|
4
4
|
backgroundColor: string;
|
|
5
5
|
}> {
|
|
6
|
-
class: "
|
|
6
|
+
class: "Screen";
|
|
7
7
|
method: "setBackgroundColor";
|
|
8
8
|
}
|
|
9
9
|
interface SetBorderColor extends BaseOperation<{
|
|
10
10
|
borderColor: string;
|
|
11
11
|
}> {
|
|
12
|
-
class: "
|
|
12
|
+
class: "Screen";
|
|
13
13
|
method: "setBorderColor";
|
|
14
14
|
}
|
|
15
15
|
export interface SetBorderWidth extends BaseOperation<{
|
|
16
16
|
borderWidth: number;
|
|
17
17
|
}> {
|
|
18
|
-
class: "
|
|
18
|
+
class: "Screen";
|
|
19
19
|
method: "setBorderWidth";
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Screen } from "./Screen";
|
|
@@ -26,6 +26,6 @@ export { Counter } from "./Examples/Counter";
|
|
|
26
26
|
export { Card } from "./Examples/CardGame/Card";
|
|
27
27
|
export { Deck } from "./Examples/CardGame/Deck";
|
|
28
28
|
export { Dice } from "./Examples/CardGame/Dice";
|
|
29
|
-
export {
|
|
29
|
+
export { Screen } from "./Examples/CardGame/Screen";
|
|
30
30
|
export { Comment } from "./Comment";
|
|
31
31
|
export type { HorisontalAlignment, VerticalAlignment } from "./Alignment";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Hand } from "./Hand";
|