microboard-temp 0.5.30 → 0.5.31
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 +47 -12
- package/dist/cjs/index.js +47 -12
- package/dist/cjs/node.js +47 -12
- package/dist/esm/browser.js +47 -12
- package/dist/esm/index.js +47 -12
- package/dist/esm/node.js +47 -12
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -47834,6 +47834,19 @@ function throttle(func, delay) {
|
|
|
47834
47834
|
};
|
|
47835
47835
|
}
|
|
47836
47836
|
|
|
47837
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
47838
|
+
var editModeHotkeyRegistry = {};
|
|
47839
|
+
var viewModeHotkeyRegistry = {};
|
|
47840
|
+
var hotkeyNames = {};
|
|
47841
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
47842
|
+
if (boardMode === "edit") {
|
|
47843
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47844
|
+
} else {
|
|
47845
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47846
|
+
}
|
|
47847
|
+
hotkeyNames[name] = hotkey;
|
|
47848
|
+
}
|
|
47849
|
+
|
|
47837
47850
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
47838
47851
|
var defaultCardData = {
|
|
47839
47852
|
itemType: "Card",
|
|
@@ -48012,19 +48025,40 @@ registerItem({
|
|
|
48012
48025
|
item: Card,
|
|
48013
48026
|
defaultData: defaultCardData
|
|
48014
48027
|
});
|
|
48015
|
-
|
|
48016
|
-
|
|
48017
|
-
|
|
48018
|
-
|
|
48019
|
-
|
|
48020
|
-
|
|
48021
|
-
|
|
48022
|
-
|
|
48023
|
-
|
|
48028
|
+
registerHotkey({
|
|
48029
|
+
name: "Rotate90deg",
|
|
48030
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
48031
|
+
boardMode: "edit",
|
|
48032
|
+
hotkeyConfig: {
|
|
48033
|
+
allItemsType: ["Image", "Card"],
|
|
48034
|
+
cb: (event, board) => {
|
|
48035
|
+
const items = board?.selection.items.list();
|
|
48036
|
+
if (!items) {
|
|
48037
|
+
return;
|
|
48038
|
+
}
|
|
48039
|
+
items.forEach((item) => {
|
|
48040
|
+
item.rotate(false);
|
|
48041
|
+
});
|
|
48042
|
+
}
|
|
48024
48043
|
}
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48044
|
+
});
|
|
48045
|
+
registerHotkey({
|
|
48046
|
+
name: "Rotate90deg-clockwise",
|
|
48047
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
48048
|
+
boardMode: "edit",
|
|
48049
|
+
hotkeyConfig: {
|
|
48050
|
+
allItemsType: ["Image", "Card"],
|
|
48051
|
+
cb: (event, board) => {
|
|
48052
|
+
const items = board?.selection.items.list();
|
|
48053
|
+
if (!items) {
|
|
48054
|
+
return;
|
|
48055
|
+
}
|
|
48056
|
+
items.forEach((item) => {
|
|
48057
|
+
item.rotate(true);
|
|
48058
|
+
});
|
|
48059
|
+
}
|
|
48060
|
+
}
|
|
48061
|
+
});
|
|
48028
48062
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
48029
48063
|
var defaultDeckData = {
|
|
48030
48064
|
itemType: "Deck"
|
|
@@ -48069,6 +48103,7 @@ class Deck extends BaseItem {
|
|
|
48069
48103
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
48070
48104
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
48071
48105
|
});
|
|
48106
|
+
this.board.selection.remove(foundItem);
|
|
48072
48107
|
this.board.items.index.remove(foundItem);
|
|
48073
48108
|
foundItem.parent = this.getId();
|
|
48074
48109
|
foundItem.shouldUseRelativeAlignment = false;
|
package/dist/cjs/index.js
CHANGED
|
@@ -47834,6 +47834,19 @@ function throttle(func, delay) {
|
|
|
47834
47834
|
};
|
|
47835
47835
|
}
|
|
47836
47836
|
|
|
47837
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
47838
|
+
var editModeHotkeyRegistry = {};
|
|
47839
|
+
var viewModeHotkeyRegistry = {};
|
|
47840
|
+
var hotkeyNames = {};
|
|
47841
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
47842
|
+
if (boardMode === "edit") {
|
|
47843
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47844
|
+
} else {
|
|
47845
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47846
|
+
}
|
|
47847
|
+
hotkeyNames[name] = hotkey;
|
|
47848
|
+
}
|
|
47849
|
+
|
|
47837
47850
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
47838
47851
|
var defaultCardData = {
|
|
47839
47852
|
itemType: "Card",
|
|
@@ -48012,19 +48025,40 @@ registerItem({
|
|
|
48012
48025
|
item: Card,
|
|
48013
48026
|
defaultData: defaultCardData
|
|
48014
48027
|
});
|
|
48015
|
-
|
|
48016
|
-
|
|
48017
|
-
|
|
48018
|
-
|
|
48019
|
-
|
|
48020
|
-
|
|
48021
|
-
|
|
48022
|
-
|
|
48023
|
-
|
|
48028
|
+
registerHotkey({
|
|
48029
|
+
name: "Rotate90deg",
|
|
48030
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
48031
|
+
boardMode: "edit",
|
|
48032
|
+
hotkeyConfig: {
|
|
48033
|
+
allItemsType: ["Image", "Card"],
|
|
48034
|
+
cb: (event, board) => {
|
|
48035
|
+
const items = board?.selection.items.list();
|
|
48036
|
+
if (!items) {
|
|
48037
|
+
return;
|
|
48038
|
+
}
|
|
48039
|
+
items.forEach((item) => {
|
|
48040
|
+
item.rotate(false);
|
|
48041
|
+
});
|
|
48042
|
+
}
|
|
48024
48043
|
}
|
|
48025
|
-
|
|
48026
|
-
|
|
48027
|
-
|
|
48044
|
+
});
|
|
48045
|
+
registerHotkey({
|
|
48046
|
+
name: "Rotate90deg-clockwise",
|
|
48047
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
48048
|
+
boardMode: "edit",
|
|
48049
|
+
hotkeyConfig: {
|
|
48050
|
+
allItemsType: ["Image", "Card"],
|
|
48051
|
+
cb: (event, board) => {
|
|
48052
|
+
const items = board?.selection.items.list();
|
|
48053
|
+
if (!items) {
|
|
48054
|
+
return;
|
|
48055
|
+
}
|
|
48056
|
+
items.forEach((item) => {
|
|
48057
|
+
item.rotate(true);
|
|
48058
|
+
});
|
|
48059
|
+
}
|
|
48060
|
+
}
|
|
48061
|
+
});
|
|
48028
48062
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
48029
48063
|
var defaultDeckData = {
|
|
48030
48064
|
itemType: "Deck"
|
|
@@ -48069,6 +48103,7 @@ class Deck extends BaseItem {
|
|
|
48069
48103
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
48070
48104
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
48071
48105
|
});
|
|
48106
|
+
this.board.selection.remove(foundItem);
|
|
48072
48107
|
this.board.items.index.remove(foundItem);
|
|
48073
48108
|
foundItem.parent = this.getId();
|
|
48074
48109
|
foundItem.shouldUseRelativeAlignment = false;
|
package/dist/cjs/node.js
CHANGED
|
@@ -50307,6 +50307,19 @@ function throttle(func, delay) {
|
|
|
50307
50307
|
};
|
|
50308
50308
|
}
|
|
50309
50309
|
|
|
50310
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
50311
|
+
var editModeHotkeyRegistry = {};
|
|
50312
|
+
var viewModeHotkeyRegistry = {};
|
|
50313
|
+
var hotkeyNames = {};
|
|
50314
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
50315
|
+
if (boardMode === "edit") {
|
|
50316
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
50317
|
+
} else {
|
|
50318
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
50319
|
+
}
|
|
50320
|
+
hotkeyNames[name] = hotkey;
|
|
50321
|
+
}
|
|
50322
|
+
|
|
50310
50323
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
50311
50324
|
var defaultCardData = {
|
|
50312
50325
|
itemType: "Card",
|
|
@@ -50485,19 +50498,40 @@ registerItem({
|
|
|
50485
50498
|
item: Card,
|
|
50486
50499
|
defaultData: defaultCardData
|
|
50487
50500
|
});
|
|
50488
|
-
|
|
50489
|
-
|
|
50490
|
-
|
|
50491
|
-
|
|
50492
|
-
|
|
50493
|
-
|
|
50494
|
-
|
|
50495
|
-
|
|
50496
|
-
|
|
50501
|
+
registerHotkey({
|
|
50502
|
+
name: "Rotate90deg",
|
|
50503
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
50504
|
+
boardMode: "edit",
|
|
50505
|
+
hotkeyConfig: {
|
|
50506
|
+
allItemsType: ["Image", "Card"],
|
|
50507
|
+
cb: (event, board) => {
|
|
50508
|
+
const items = board?.selection.items.list();
|
|
50509
|
+
if (!items) {
|
|
50510
|
+
return;
|
|
50511
|
+
}
|
|
50512
|
+
items.forEach((item) => {
|
|
50513
|
+
item.rotate(false);
|
|
50514
|
+
});
|
|
50515
|
+
}
|
|
50497
50516
|
}
|
|
50498
|
-
|
|
50499
|
-
|
|
50500
|
-
|
|
50517
|
+
});
|
|
50518
|
+
registerHotkey({
|
|
50519
|
+
name: "Rotate90deg-clockwise",
|
|
50520
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
50521
|
+
boardMode: "edit",
|
|
50522
|
+
hotkeyConfig: {
|
|
50523
|
+
allItemsType: ["Image", "Card"],
|
|
50524
|
+
cb: (event, board) => {
|
|
50525
|
+
const items = board?.selection.items.list();
|
|
50526
|
+
if (!items) {
|
|
50527
|
+
return;
|
|
50528
|
+
}
|
|
50529
|
+
items.forEach((item) => {
|
|
50530
|
+
item.rotate(true);
|
|
50531
|
+
});
|
|
50532
|
+
}
|
|
50533
|
+
}
|
|
50534
|
+
});
|
|
50501
50535
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
50502
50536
|
var defaultDeckData = {
|
|
50503
50537
|
itemType: "Deck"
|
|
@@ -50542,6 +50576,7 @@ class Deck extends BaseItem {
|
|
|
50542
50576
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
50543
50577
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
50544
50578
|
});
|
|
50579
|
+
this.board.selection.remove(foundItem);
|
|
50545
50580
|
this.board.items.index.remove(foundItem);
|
|
50546
50581
|
foundItem.parent = this.getId();
|
|
50547
50582
|
foundItem.shouldUseRelativeAlignment = false;
|
package/dist/esm/browser.js
CHANGED
|
@@ -47680,6 +47680,19 @@ function throttle(func, delay) {
|
|
|
47680
47680
|
};
|
|
47681
47681
|
}
|
|
47682
47682
|
|
|
47683
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
47684
|
+
var editModeHotkeyRegistry = {};
|
|
47685
|
+
var viewModeHotkeyRegistry = {};
|
|
47686
|
+
var hotkeyNames = {};
|
|
47687
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
47688
|
+
if (boardMode === "edit") {
|
|
47689
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47690
|
+
} else {
|
|
47691
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47692
|
+
}
|
|
47693
|
+
hotkeyNames[name] = hotkey;
|
|
47694
|
+
}
|
|
47695
|
+
|
|
47683
47696
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
47684
47697
|
var defaultCardData = {
|
|
47685
47698
|
itemType: "Card",
|
|
@@ -47858,19 +47871,40 @@ registerItem({
|
|
|
47858
47871
|
item: Card,
|
|
47859
47872
|
defaultData: defaultCardData
|
|
47860
47873
|
});
|
|
47861
|
-
|
|
47862
|
-
|
|
47863
|
-
|
|
47864
|
-
|
|
47865
|
-
|
|
47866
|
-
|
|
47867
|
-
|
|
47868
|
-
|
|
47869
|
-
|
|
47874
|
+
registerHotkey({
|
|
47875
|
+
name: "Rotate90deg",
|
|
47876
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
47877
|
+
boardMode: "edit",
|
|
47878
|
+
hotkeyConfig: {
|
|
47879
|
+
allItemsType: ["Image", "Card"],
|
|
47880
|
+
cb: (event, board) => {
|
|
47881
|
+
const items = board?.selection.items.list();
|
|
47882
|
+
if (!items) {
|
|
47883
|
+
return;
|
|
47884
|
+
}
|
|
47885
|
+
items.forEach((item) => {
|
|
47886
|
+
item.rotate(false);
|
|
47887
|
+
});
|
|
47888
|
+
}
|
|
47870
47889
|
}
|
|
47871
|
-
|
|
47872
|
-
|
|
47873
|
-
|
|
47890
|
+
});
|
|
47891
|
+
registerHotkey({
|
|
47892
|
+
name: "Rotate90deg-clockwise",
|
|
47893
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
47894
|
+
boardMode: "edit",
|
|
47895
|
+
hotkeyConfig: {
|
|
47896
|
+
allItemsType: ["Image", "Card"],
|
|
47897
|
+
cb: (event, board) => {
|
|
47898
|
+
const items = board?.selection.items.list();
|
|
47899
|
+
if (!items) {
|
|
47900
|
+
return;
|
|
47901
|
+
}
|
|
47902
|
+
items.forEach((item) => {
|
|
47903
|
+
item.rotate(true);
|
|
47904
|
+
});
|
|
47905
|
+
}
|
|
47906
|
+
}
|
|
47907
|
+
});
|
|
47874
47908
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
47875
47909
|
var defaultDeckData = {
|
|
47876
47910
|
itemType: "Deck"
|
|
@@ -47915,6 +47949,7 @@ class Deck extends BaseItem {
|
|
|
47915
47949
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
47916
47950
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
47917
47951
|
});
|
|
47952
|
+
this.board.selection.remove(foundItem);
|
|
47918
47953
|
this.board.items.index.remove(foundItem);
|
|
47919
47954
|
foundItem.parent = this.getId();
|
|
47920
47955
|
foundItem.shouldUseRelativeAlignment = false;
|
package/dist/esm/index.js
CHANGED
|
@@ -47673,6 +47673,19 @@ function throttle(func, delay) {
|
|
|
47673
47673
|
};
|
|
47674
47674
|
}
|
|
47675
47675
|
|
|
47676
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
47677
|
+
var editModeHotkeyRegistry = {};
|
|
47678
|
+
var viewModeHotkeyRegistry = {};
|
|
47679
|
+
var hotkeyNames = {};
|
|
47680
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
47681
|
+
if (boardMode === "edit") {
|
|
47682
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47683
|
+
} else {
|
|
47684
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
47685
|
+
}
|
|
47686
|
+
hotkeyNames[name] = hotkey;
|
|
47687
|
+
}
|
|
47688
|
+
|
|
47676
47689
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
47677
47690
|
var defaultCardData = {
|
|
47678
47691
|
itemType: "Card",
|
|
@@ -47851,19 +47864,40 @@ registerItem({
|
|
|
47851
47864
|
item: Card,
|
|
47852
47865
|
defaultData: defaultCardData
|
|
47853
47866
|
});
|
|
47854
|
-
|
|
47855
|
-
|
|
47856
|
-
|
|
47857
|
-
|
|
47858
|
-
|
|
47859
|
-
|
|
47860
|
-
|
|
47861
|
-
|
|
47862
|
-
|
|
47867
|
+
registerHotkey({
|
|
47868
|
+
name: "Rotate90deg",
|
|
47869
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
47870
|
+
boardMode: "edit",
|
|
47871
|
+
hotkeyConfig: {
|
|
47872
|
+
allItemsType: ["Image", "Card"],
|
|
47873
|
+
cb: (event, board) => {
|
|
47874
|
+
const items = board?.selection.items.list();
|
|
47875
|
+
if (!items) {
|
|
47876
|
+
return;
|
|
47877
|
+
}
|
|
47878
|
+
items.forEach((item) => {
|
|
47879
|
+
item.rotate(false);
|
|
47880
|
+
});
|
|
47881
|
+
}
|
|
47863
47882
|
}
|
|
47864
|
-
|
|
47865
|
-
|
|
47866
|
-
|
|
47883
|
+
});
|
|
47884
|
+
registerHotkey({
|
|
47885
|
+
name: "Rotate90deg-clockwise",
|
|
47886
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
47887
|
+
boardMode: "edit",
|
|
47888
|
+
hotkeyConfig: {
|
|
47889
|
+
allItemsType: ["Image", "Card"],
|
|
47890
|
+
cb: (event, board) => {
|
|
47891
|
+
const items = board?.selection.items.list();
|
|
47892
|
+
if (!items) {
|
|
47893
|
+
return;
|
|
47894
|
+
}
|
|
47895
|
+
items.forEach((item) => {
|
|
47896
|
+
item.rotate(true);
|
|
47897
|
+
});
|
|
47898
|
+
}
|
|
47899
|
+
}
|
|
47900
|
+
});
|
|
47867
47901
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
47868
47902
|
var defaultDeckData = {
|
|
47869
47903
|
itemType: "Deck"
|
|
@@ -47908,6 +47942,7 @@ class Deck extends BaseItem {
|
|
|
47908
47942
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
47909
47943
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
47910
47944
|
});
|
|
47945
|
+
this.board.selection.remove(foundItem);
|
|
47911
47946
|
this.board.items.index.remove(foundItem);
|
|
47912
47947
|
foundItem.parent = this.getId();
|
|
47913
47948
|
foundItem.shouldUseRelativeAlignment = false;
|
package/dist/esm/node.js
CHANGED
|
@@ -50141,6 +50141,19 @@ function throttle(func, delay) {
|
|
|
50141
50141
|
};
|
|
50142
50142
|
}
|
|
50143
50143
|
|
|
50144
|
+
// src/Keyboard/HotkeyRegistry.ts
|
|
50145
|
+
var editModeHotkeyRegistry = {};
|
|
50146
|
+
var viewModeHotkeyRegistry = {};
|
|
50147
|
+
var hotkeyNames = {};
|
|
50148
|
+
function registerHotkey({ name, hotkey, hotkeyConfig, boardMode }) {
|
|
50149
|
+
if (boardMode === "edit") {
|
|
50150
|
+
editModeHotkeyRegistry[name] = hotkeyConfig;
|
|
50151
|
+
} else {
|
|
50152
|
+
viewModeHotkeyRegistry[name] = hotkeyConfig;
|
|
50153
|
+
}
|
|
50154
|
+
hotkeyNames[name] = hotkey;
|
|
50155
|
+
}
|
|
50156
|
+
|
|
50144
50157
|
// src/Items/Examples/CardGame/Card/Card.ts
|
|
50145
50158
|
var defaultCardData = {
|
|
50146
50159
|
itemType: "Card",
|
|
@@ -50319,19 +50332,40 @@ registerItem({
|
|
|
50319
50332
|
item: Card,
|
|
50320
50333
|
defaultData: defaultCardData
|
|
50321
50334
|
});
|
|
50322
|
-
|
|
50323
|
-
|
|
50324
|
-
|
|
50325
|
-
|
|
50326
|
-
|
|
50327
|
-
|
|
50328
|
-
|
|
50329
|
-
|
|
50330
|
-
|
|
50335
|
+
registerHotkey({
|
|
50336
|
+
name: "Rotate90deg",
|
|
50337
|
+
hotkey: { key: { button: "KeyQ" }, label: { windows: "Q", mac: "Q" } },
|
|
50338
|
+
boardMode: "edit",
|
|
50339
|
+
hotkeyConfig: {
|
|
50340
|
+
allItemsType: ["Image", "Card"],
|
|
50341
|
+
cb: (event, board) => {
|
|
50342
|
+
const items = board?.selection.items.list();
|
|
50343
|
+
if (!items) {
|
|
50344
|
+
return;
|
|
50345
|
+
}
|
|
50346
|
+
items.forEach((item) => {
|
|
50347
|
+
item.rotate(false);
|
|
50348
|
+
});
|
|
50349
|
+
}
|
|
50331
50350
|
}
|
|
50332
|
-
|
|
50333
|
-
|
|
50334
|
-
|
|
50351
|
+
});
|
|
50352
|
+
registerHotkey({
|
|
50353
|
+
name: "Rotate90deg-clockwise",
|
|
50354
|
+
hotkey: { key: { button: "KeyE" }, label: { windows: "E", mac: "E" } },
|
|
50355
|
+
boardMode: "edit",
|
|
50356
|
+
hotkeyConfig: {
|
|
50357
|
+
allItemsType: ["Image", "Card"],
|
|
50358
|
+
cb: (event, board) => {
|
|
50359
|
+
const items = board?.selection.items.list();
|
|
50360
|
+
if (!items) {
|
|
50361
|
+
return;
|
|
50362
|
+
}
|
|
50363
|
+
items.forEach((item) => {
|
|
50364
|
+
item.rotate(true);
|
|
50365
|
+
});
|
|
50366
|
+
}
|
|
50367
|
+
}
|
|
50368
|
+
});
|
|
50335
50369
|
// src/Items/Examples/CardGame/Deck/Deck.ts
|
|
50336
50370
|
var defaultDeckData = {
|
|
50337
50371
|
itemType: "Deck"
|
|
@@ -50376,6 +50410,7 @@ class Deck extends BaseItem {
|
|
|
50376
50410
|
x: this.left + (this.index?.list().length || 0) * (this.isPerpendicular ? 0 : conf.DECK_HORIZONTAL_OFFSET),
|
|
50377
50411
|
y: this.top + (this.index?.list().length || 0) * (this.isPerpendicular ? conf.DECK_VERTICAL_OFFSET : 0)
|
|
50378
50412
|
});
|
|
50413
|
+
this.board.selection.remove(foundItem);
|
|
50379
50414
|
this.board.items.index.remove(foundItem);
|
|
50380
50415
|
foundItem.parent = this.getId();
|
|
50381
50416
|
foundItem.shouldUseRelativeAlignment = false;
|