microboard-temp 0.4.84 → 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 +14 -13
- package/dist/cjs/index.js +14 -13
- package/dist/cjs/node.js +14 -13
- package/dist/esm/browser.js +14 -13
- package/dist/esm/index.js +14 -13
- package/dist/esm/node.js +14 -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,
|
|
@@ -46905,6 +46905,7 @@ class ShapeTool extends CustomTool {
|
|
|
46905
46905
|
this.isDown = false;
|
|
46906
46906
|
this.board.selection.removeAll();
|
|
46907
46907
|
this.board.selection.add(addedItem);
|
|
46908
|
+
this.board.tools.select();
|
|
46908
46909
|
this.board.tools.publish();
|
|
46909
46910
|
return true;
|
|
46910
46911
|
}
|
|
@@ -48326,10 +48327,10 @@ registerItem({
|
|
|
48326
48327
|
defaultData: defaultDiceData,
|
|
48327
48328
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48328
48329
|
});
|
|
48329
|
-
// src/Items/Examples/CardGame/
|
|
48330
|
-
class
|
|
48330
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48331
|
+
class AddScreen extends ShapeTool {
|
|
48331
48332
|
constructor(board, name) {
|
|
48332
|
-
super(board, name,
|
|
48333
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48333
48334
|
}
|
|
48334
48335
|
pointerUp() {
|
|
48335
48336
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48337,26 +48338,26 @@ class AddHand extends ShapeTool {
|
|
|
48337
48338
|
}
|
|
48338
48339
|
}
|
|
48339
48340
|
|
|
48340
|
-
// src/Items/Examples/CardGame/
|
|
48341
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48341
48342
|
var handPath = new Path([
|
|
48342
48343
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48343
48344
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48344
48345
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48345
48346
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48346
48347
|
], true, "#FFFFFF", "#000000");
|
|
48347
|
-
var
|
|
48348
|
-
itemType: "
|
|
48348
|
+
var defaultScreenData = {
|
|
48349
|
+
itemType: "Screen",
|
|
48349
48350
|
ownerId: ""
|
|
48350
48351
|
};
|
|
48351
48352
|
|
|
48352
|
-
class
|
|
48353
|
+
class Screen extends BaseItem {
|
|
48353
48354
|
ownerId;
|
|
48354
48355
|
subject = new Subject;
|
|
48355
48356
|
path;
|
|
48356
48357
|
borderWidth = 1;
|
|
48357
48358
|
backgroundColor = "#FFFFFF";
|
|
48358
48359
|
constructor(board, id = "", ownerId = "") {
|
|
48359
|
-
super(board, id,
|
|
48360
|
+
super(board, id, defaultScreenData, true);
|
|
48360
48361
|
this.ownerId = ownerId;
|
|
48361
48362
|
this.transformation.subject.subscribe(() => {
|
|
48362
48363
|
this.transformPath();
|
|
@@ -48369,7 +48370,7 @@ class Hand extends BaseItem {
|
|
|
48369
48370
|
apply(op) {
|
|
48370
48371
|
super.apply(op);
|
|
48371
48372
|
switch (op.class) {
|
|
48372
|
-
case "
|
|
48373
|
+
case "Screen":
|
|
48373
48374
|
switch (op.method) {
|
|
48374
48375
|
case "setBorderWidth":
|
|
48375
48376
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48470,9 +48471,9 @@ class Hand extends BaseItem {
|
|
|
48470
48471
|
}
|
|
48471
48472
|
}
|
|
48472
48473
|
registerItem({
|
|
48473
|
-
item:
|
|
48474
|
-
defaultData:
|
|
48475
|
-
toolData: { name: "
|
|
48474
|
+
item: Screen,
|
|
48475
|
+
defaultData: defaultScreenData,
|
|
48476
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48476
48477
|
});
|
|
48477
48478
|
// src/Pointer/Cursor.ts
|
|
48478
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,
|
|
@@ -46905,6 +46905,7 @@ class ShapeTool extends CustomTool {
|
|
|
46905
46905
|
this.isDown = false;
|
|
46906
46906
|
this.board.selection.removeAll();
|
|
46907
46907
|
this.board.selection.add(addedItem);
|
|
46908
|
+
this.board.tools.select();
|
|
46908
46909
|
this.board.tools.publish();
|
|
46909
46910
|
return true;
|
|
46910
46911
|
}
|
|
@@ -48326,10 +48327,10 @@ registerItem({
|
|
|
48326
48327
|
defaultData: defaultDiceData,
|
|
48327
48328
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48328
48329
|
});
|
|
48329
|
-
// src/Items/Examples/CardGame/
|
|
48330
|
-
class
|
|
48330
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48331
|
+
class AddScreen extends ShapeTool {
|
|
48331
48332
|
constructor(board, name) {
|
|
48332
|
-
super(board, name,
|
|
48333
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48333
48334
|
}
|
|
48334
48335
|
pointerUp() {
|
|
48335
48336
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48337,26 +48338,26 @@ class AddHand extends ShapeTool {
|
|
|
48337
48338
|
}
|
|
48338
48339
|
}
|
|
48339
48340
|
|
|
48340
|
-
// src/Items/Examples/CardGame/
|
|
48341
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48341
48342
|
var handPath = new Path([
|
|
48342
48343
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48343
48344
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48344
48345
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48345
48346
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48346
48347
|
], true, "#FFFFFF", "#000000");
|
|
48347
|
-
var
|
|
48348
|
-
itemType: "
|
|
48348
|
+
var defaultScreenData = {
|
|
48349
|
+
itemType: "Screen",
|
|
48349
48350
|
ownerId: ""
|
|
48350
48351
|
};
|
|
48351
48352
|
|
|
48352
|
-
class
|
|
48353
|
+
class Screen extends BaseItem {
|
|
48353
48354
|
ownerId;
|
|
48354
48355
|
subject = new Subject;
|
|
48355
48356
|
path;
|
|
48356
48357
|
borderWidth = 1;
|
|
48357
48358
|
backgroundColor = "#FFFFFF";
|
|
48358
48359
|
constructor(board, id = "", ownerId = "") {
|
|
48359
|
-
super(board, id,
|
|
48360
|
+
super(board, id, defaultScreenData, true);
|
|
48360
48361
|
this.ownerId = ownerId;
|
|
48361
48362
|
this.transformation.subject.subscribe(() => {
|
|
48362
48363
|
this.transformPath();
|
|
@@ -48369,7 +48370,7 @@ class Hand extends BaseItem {
|
|
|
48369
48370
|
apply(op) {
|
|
48370
48371
|
super.apply(op);
|
|
48371
48372
|
switch (op.class) {
|
|
48372
|
-
case "
|
|
48373
|
+
case "Screen":
|
|
48373
48374
|
switch (op.method) {
|
|
48374
48375
|
case "setBorderWidth":
|
|
48375
48376
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48470,9 +48471,9 @@ class Hand extends BaseItem {
|
|
|
48470
48471
|
}
|
|
48471
48472
|
}
|
|
48472
48473
|
registerItem({
|
|
48473
|
-
item:
|
|
48474
|
-
defaultData:
|
|
48475
|
-
toolData: { name: "
|
|
48474
|
+
item: Screen,
|
|
48475
|
+
defaultData: defaultScreenData,
|
|
48476
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48476
48477
|
});
|
|
48477
48478
|
// src/Pointer/Cursor.ts
|
|
48478
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,
|
|
@@ -49378,6 +49378,7 @@ class ShapeTool extends CustomTool {
|
|
|
49378
49378
|
this.isDown = false;
|
|
49379
49379
|
this.board.selection.removeAll();
|
|
49380
49380
|
this.board.selection.add(addedItem);
|
|
49381
|
+
this.board.tools.select();
|
|
49381
49382
|
this.board.tools.publish();
|
|
49382
49383
|
return true;
|
|
49383
49384
|
}
|
|
@@ -50799,10 +50800,10 @@ registerItem({
|
|
|
50799
50800
|
defaultData: defaultDiceData,
|
|
50800
50801
|
toolData: { name: "AddDice", tool: AddDice }
|
|
50801
50802
|
});
|
|
50802
|
-
// src/Items/Examples/CardGame/
|
|
50803
|
-
class
|
|
50803
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
50804
|
+
class AddScreen extends ShapeTool {
|
|
50804
50805
|
constructor(board, name) {
|
|
50805
|
-
super(board, name,
|
|
50806
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
50806
50807
|
}
|
|
50807
50808
|
pointerUp() {
|
|
50808
50809
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -50810,26 +50811,26 @@ class AddHand extends ShapeTool {
|
|
|
50810
50811
|
}
|
|
50811
50812
|
}
|
|
50812
50813
|
|
|
50813
|
-
// src/Items/Examples/CardGame/
|
|
50814
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
50814
50815
|
var handPath = new Path([
|
|
50815
50816
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
50816
50817
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
50817
50818
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
50818
50819
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
50819
50820
|
], true, "#FFFFFF", "#000000");
|
|
50820
|
-
var
|
|
50821
|
-
itemType: "
|
|
50821
|
+
var defaultScreenData = {
|
|
50822
|
+
itemType: "Screen",
|
|
50822
50823
|
ownerId: ""
|
|
50823
50824
|
};
|
|
50824
50825
|
|
|
50825
|
-
class
|
|
50826
|
+
class Screen extends BaseItem {
|
|
50826
50827
|
ownerId;
|
|
50827
50828
|
subject = new Subject;
|
|
50828
50829
|
path;
|
|
50829
50830
|
borderWidth = 1;
|
|
50830
50831
|
backgroundColor = "#FFFFFF";
|
|
50831
50832
|
constructor(board, id = "", ownerId = "") {
|
|
50832
|
-
super(board, id,
|
|
50833
|
+
super(board, id, defaultScreenData, true);
|
|
50833
50834
|
this.ownerId = ownerId;
|
|
50834
50835
|
this.transformation.subject.subscribe(() => {
|
|
50835
50836
|
this.transformPath();
|
|
@@ -50842,7 +50843,7 @@ class Hand extends BaseItem {
|
|
|
50842
50843
|
apply(op) {
|
|
50843
50844
|
super.apply(op);
|
|
50844
50845
|
switch (op.class) {
|
|
50845
|
-
case "
|
|
50846
|
+
case "Screen":
|
|
50846
50847
|
switch (op.method) {
|
|
50847
50848
|
case "setBorderWidth":
|
|
50848
50849
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -50943,9 +50944,9 @@ class Hand extends BaseItem {
|
|
|
50943
50944
|
}
|
|
50944
50945
|
}
|
|
50945
50946
|
registerItem({
|
|
50946
|
-
item:
|
|
50947
|
-
defaultData:
|
|
50948
|
-
toolData: { name: "
|
|
50947
|
+
item: Screen,
|
|
50948
|
+
defaultData: defaultScreenData,
|
|
50949
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
50949
50950
|
});
|
|
50950
50951
|
// src/Pointer/Cursor.ts
|
|
50951
50952
|
var defaultCursors = [
|
package/dist/esm/browser.js
CHANGED
|
@@ -46754,6 +46754,7 @@ class ShapeTool extends CustomTool {
|
|
|
46754
46754
|
this.isDown = false;
|
|
46755
46755
|
this.board.selection.removeAll();
|
|
46756
46756
|
this.board.selection.add(addedItem);
|
|
46757
|
+
this.board.tools.select();
|
|
46757
46758
|
this.board.tools.publish();
|
|
46758
46759
|
return true;
|
|
46759
46760
|
}
|
|
@@ -48175,10 +48176,10 @@ registerItem({
|
|
|
48175
48176
|
defaultData: defaultDiceData,
|
|
48176
48177
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48177
48178
|
});
|
|
48178
|
-
// src/Items/Examples/CardGame/
|
|
48179
|
-
class
|
|
48179
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48180
|
+
class AddScreen extends ShapeTool {
|
|
48180
48181
|
constructor(board, name) {
|
|
48181
|
-
super(board, name,
|
|
48182
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48182
48183
|
}
|
|
48183
48184
|
pointerUp() {
|
|
48184
48185
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48186,26 +48187,26 @@ class AddHand extends ShapeTool {
|
|
|
48186
48187
|
}
|
|
48187
48188
|
}
|
|
48188
48189
|
|
|
48189
|
-
// src/Items/Examples/CardGame/
|
|
48190
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48190
48191
|
var handPath = new Path([
|
|
48191
48192
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48192
48193
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48193
48194
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48194
48195
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48195
48196
|
], true, "#FFFFFF", "#000000");
|
|
48196
|
-
var
|
|
48197
|
-
itemType: "
|
|
48197
|
+
var defaultScreenData = {
|
|
48198
|
+
itemType: "Screen",
|
|
48198
48199
|
ownerId: ""
|
|
48199
48200
|
};
|
|
48200
48201
|
|
|
48201
|
-
class
|
|
48202
|
+
class Screen extends BaseItem {
|
|
48202
48203
|
ownerId;
|
|
48203
48204
|
subject = new Subject;
|
|
48204
48205
|
path;
|
|
48205
48206
|
borderWidth = 1;
|
|
48206
48207
|
backgroundColor = "#FFFFFF";
|
|
48207
48208
|
constructor(board, id = "", ownerId = "") {
|
|
48208
|
-
super(board, id,
|
|
48209
|
+
super(board, id, defaultScreenData, true);
|
|
48209
48210
|
this.ownerId = ownerId;
|
|
48210
48211
|
this.transformation.subject.subscribe(() => {
|
|
48211
48212
|
this.transformPath();
|
|
@@ -48218,7 +48219,7 @@ class Hand extends BaseItem {
|
|
|
48218
48219
|
apply(op) {
|
|
48219
48220
|
super.apply(op);
|
|
48220
48221
|
switch (op.class) {
|
|
48221
|
-
case "
|
|
48222
|
+
case "Screen":
|
|
48222
48223
|
switch (op.method) {
|
|
48223
48224
|
case "setBorderWidth":
|
|
48224
48225
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48319,9 +48320,9 @@ class Hand extends BaseItem {
|
|
|
48319
48320
|
}
|
|
48320
48321
|
}
|
|
48321
48322
|
registerItem({
|
|
48322
|
-
item:
|
|
48323
|
-
defaultData:
|
|
48324
|
-
toolData: { name: "
|
|
48323
|
+
item: Screen,
|
|
48324
|
+
defaultData: defaultScreenData,
|
|
48325
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48325
48326
|
});
|
|
48326
48327
|
// src/Pointer/Cursor.ts
|
|
48327
48328
|
var defaultCursors = [
|
|
@@ -56828,6 +56829,7 @@ export {
|
|
|
56828
56829
|
Shape,
|
|
56829
56830
|
SessionStorage,
|
|
56830
56831
|
BoardSelection as Selection,
|
|
56832
|
+
Screen,
|
|
56831
56833
|
STEP_STROKE_WIDTH,
|
|
56832
56834
|
SHAPE_LAST_TYPE_KEY,
|
|
56833
56835
|
SHAPES_CATEGORIES,
|
|
@@ -56852,7 +56854,6 @@ export {
|
|
|
56852
56854
|
Keyboard,
|
|
56853
56855
|
Items,
|
|
56854
56856
|
ImageItem,
|
|
56855
|
-
Hand,
|
|
56856
56857
|
Group,
|
|
56857
56858
|
Frames,
|
|
56858
56859
|
FrameCommand,
|
package/dist/esm/index.js
CHANGED
|
@@ -46747,6 +46747,7 @@ class ShapeTool extends CustomTool {
|
|
|
46747
46747
|
this.isDown = false;
|
|
46748
46748
|
this.board.selection.removeAll();
|
|
46749
46749
|
this.board.selection.add(addedItem);
|
|
46750
|
+
this.board.tools.select();
|
|
46750
46751
|
this.board.tools.publish();
|
|
46751
46752
|
return true;
|
|
46752
46753
|
}
|
|
@@ -48168,10 +48169,10 @@ registerItem({
|
|
|
48168
48169
|
defaultData: defaultDiceData,
|
|
48169
48170
|
toolData: { name: "AddDice", tool: AddDice }
|
|
48170
48171
|
});
|
|
48171
|
-
// src/Items/Examples/CardGame/
|
|
48172
|
-
class
|
|
48172
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
48173
|
+
class AddScreen extends ShapeTool {
|
|
48173
48174
|
constructor(board, name) {
|
|
48174
|
-
super(board, name,
|
|
48175
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
48175
48176
|
}
|
|
48176
48177
|
pointerUp() {
|
|
48177
48178
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -48179,26 +48180,26 @@ class AddHand extends ShapeTool {
|
|
|
48179
48180
|
}
|
|
48180
48181
|
}
|
|
48181
48182
|
|
|
48182
|
-
// src/Items/Examples/CardGame/
|
|
48183
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
48183
48184
|
var handPath = new Path([
|
|
48184
48185
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
48185
48186
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
48186
48187
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
48187
48188
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
48188
48189
|
], true, "#FFFFFF", "#000000");
|
|
48189
|
-
var
|
|
48190
|
-
itemType: "
|
|
48190
|
+
var defaultScreenData = {
|
|
48191
|
+
itemType: "Screen",
|
|
48191
48192
|
ownerId: ""
|
|
48192
48193
|
};
|
|
48193
48194
|
|
|
48194
|
-
class
|
|
48195
|
+
class Screen extends BaseItem {
|
|
48195
48196
|
ownerId;
|
|
48196
48197
|
subject = new Subject;
|
|
48197
48198
|
path;
|
|
48198
48199
|
borderWidth = 1;
|
|
48199
48200
|
backgroundColor = "#FFFFFF";
|
|
48200
48201
|
constructor(board, id = "", ownerId = "") {
|
|
48201
|
-
super(board, id,
|
|
48202
|
+
super(board, id, defaultScreenData, true);
|
|
48202
48203
|
this.ownerId = ownerId;
|
|
48203
48204
|
this.transformation.subject.subscribe(() => {
|
|
48204
48205
|
this.transformPath();
|
|
@@ -48211,7 +48212,7 @@ class Hand extends BaseItem {
|
|
|
48211
48212
|
apply(op) {
|
|
48212
48213
|
super.apply(op);
|
|
48213
48214
|
switch (op.class) {
|
|
48214
|
-
case "
|
|
48215
|
+
case "Screen":
|
|
48215
48216
|
switch (op.method) {
|
|
48216
48217
|
case "setBorderWidth":
|
|
48217
48218
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -48312,9 +48313,9 @@ class Hand extends BaseItem {
|
|
|
48312
48313
|
}
|
|
48313
48314
|
}
|
|
48314
48315
|
registerItem({
|
|
48315
|
-
item:
|
|
48316
|
-
defaultData:
|
|
48317
|
-
toolData: { name: "
|
|
48316
|
+
item: Screen,
|
|
48317
|
+
defaultData: defaultScreenData,
|
|
48318
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
48318
48319
|
});
|
|
48319
48320
|
// src/Pointer/Cursor.ts
|
|
48320
48321
|
var defaultCursors = [
|
|
@@ -56726,6 +56727,7 @@ export {
|
|
|
56726
56727
|
Shape,
|
|
56727
56728
|
SessionStorage,
|
|
56728
56729
|
BoardSelection as Selection,
|
|
56730
|
+
Screen,
|
|
56729
56731
|
STEP_STROKE_WIDTH,
|
|
56730
56732
|
SHAPE_LAST_TYPE_KEY,
|
|
56731
56733
|
SHAPES_CATEGORIES,
|
|
@@ -56750,7 +56752,6 @@ export {
|
|
|
56750
56752
|
Keyboard,
|
|
56751
56753
|
Items,
|
|
56752
56754
|
ImageItem,
|
|
56753
|
-
Hand,
|
|
56754
56755
|
Group,
|
|
56755
56756
|
Frames,
|
|
56756
56757
|
FrameCommand,
|
package/dist/esm/node.js
CHANGED
|
@@ -49215,6 +49215,7 @@ class ShapeTool extends CustomTool {
|
|
|
49215
49215
|
this.isDown = false;
|
|
49216
49216
|
this.board.selection.removeAll();
|
|
49217
49217
|
this.board.selection.add(addedItem);
|
|
49218
|
+
this.board.tools.select();
|
|
49218
49219
|
this.board.tools.publish();
|
|
49219
49220
|
return true;
|
|
49220
49221
|
}
|
|
@@ -50636,10 +50637,10 @@ registerItem({
|
|
|
50636
50637
|
defaultData: defaultDiceData,
|
|
50637
50638
|
toolData: { name: "AddDice", tool: AddDice }
|
|
50638
50639
|
});
|
|
50639
|
-
// src/Items/Examples/CardGame/
|
|
50640
|
-
class
|
|
50640
|
+
// src/Items/Examples/CardGame/Screen/AddScreen.ts
|
|
50641
|
+
class AddScreen extends ShapeTool {
|
|
50641
50642
|
constructor(board, name) {
|
|
50642
|
-
super(board, name,
|
|
50643
|
+
super(board, name, Screen, { cursorName: "crosshair", fixedRatio: false });
|
|
50643
50644
|
}
|
|
50644
50645
|
pointerUp() {
|
|
50645
50646
|
this.item.applyOwnerId(localStorage.getItem("currentUser") || "");
|
|
@@ -50647,26 +50648,26 @@ class AddHand extends ShapeTool {
|
|
|
50647
50648
|
}
|
|
50648
50649
|
}
|
|
50649
50650
|
|
|
50650
|
-
// src/Items/Examples/CardGame/
|
|
50651
|
+
// src/Items/Examples/CardGame/Screen/Screen.ts
|
|
50651
50652
|
var handPath = new Path([
|
|
50652
50653
|
new Line(new Point(0, 0), new Point(100, 0)),
|
|
50653
50654
|
new Line(new Point(100, 0), new Point(100, 100)),
|
|
50654
50655
|
new Line(new Point(100, 100), new Point(0, 100)),
|
|
50655
50656
|
new Line(new Point(0, 100), new Point(0, 0))
|
|
50656
50657
|
], true, "#FFFFFF", "#000000");
|
|
50657
|
-
var
|
|
50658
|
-
itemType: "
|
|
50658
|
+
var defaultScreenData = {
|
|
50659
|
+
itemType: "Screen",
|
|
50659
50660
|
ownerId: ""
|
|
50660
50661
|
};
|
|
50661
50662
|
|
|
50662
|
-
class
|
|
50663
|
+
class Screen extends BaseItem {
|
|
50663
50664
|
ownerId;
|
|
50664
50665
|
subject = new Subject;
|
|
50665
50666
|
path;
|
|
50666
50667
|
borderWidth = 1;
|
|
50667
50668
|
backgroundColor = "#FFFFFF";
|
|
50668
50669
|
constructor(board, id = "", ownerId = "") {
|
|
50669
|
-
super(board, id,
|
|
50670
|
+
super(board, id, defaultScreenData, true);
|
|
50670
50671
|
this.ownerId = ownerId;
|
|
50671
50672
|
this.transformation.subject.subscribe(() => {
|
|
50672
50673
|
this.transformPath();
|
|
@@ -50679,7 +50680,7 @@ class Hand extends BaseItem {
|
|
|
50679
50680
|
apply(op) {
|
|
50680
50681
|
super.apply(op);
|
|
50681
50682
|
switch (op.class) {
|
|
50682
|
-
case "
|
|
50683
|
+
case "Screen":
|
|
50683
50684
|
switch (op.method) {
|
|
50684
50685
|
case "setBorderWidth":
|
|
50685
50686
|
this.applyBorderWidth(op.newData.borderWidth);
|
|
@@ -50780,9 +50781,9 @@ class Hand extends BaseItem {
|
|
|
50780
50781
|
}
|
|
50781
50782
|
}
|
|
50782
50783
|
registerItem({
|
|
50783
|
-
item:
|
|
50784
|
-
defaultData:
|
|
50785
|
-
toolData: { name: "
|
|
50784
|
+
item: Screen,
|
|
50785
|
+
defaultData: defaultScreenData,
|
|
50786
|
+
toolData: { name: "AddScreen", tool: AddScreen }
|
|
50786
50787
|
});
|
|
50787
50788
|
// src/Pointer/Cursor.ts
|
|
50788
50789
|
var defaultCursors = [
|
|
@@ -59361,6 +59362,7 @@ export {
|
|
|
59361
59362
|
Shape,
|
|
59362
59363
|
SessionStorage,
|
|
59363
59364
|
BoardSelection as Selection,
|
|
59365
|
+
Screen,
|
|
59364
59366
|
STEP_STROKE_WIDTH,
|
|
59365
59367
|
SHAPE_LAST_TYPE_KEY,
|
|
59366
59368
|
SHAPES_CATEGORIES,
|
|
@@ -59385,7 +59387,6 @@ export {
|
|
|
59385
59387
|
Keyboard,
|
|
59386
59388
|
Items,
|
|
59387
59389
|
ImageItem,
|
|
59388
|
-
Hand,
|
|
59389
59390
|
Group,
|
|
59390
59391
|
Frames,
|
|
59391
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";
|