@lv-x-software-house/x_view 1.2.6-dev.42 → 1.2.6-dev.44
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/index.js +32 -2
- package/dist/index.mjs +32 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18453,7 +18453,7 @@ function XViewScene({
|
|
|
18453
18453
|
]);
|
|
18454
18454
|
(0, import_react31.useEffect)(() => {
|
|
18455
18455
|
function handleKeyDown(event) {
|
|
18456
|
-
var _a2, _b2, _c2;
|
|
18456
|
+
var _a2, _b2, _c2, _d2;
|
|
18457
18457
|
const context = actionHandlerContext;
|
|
18458
18458
|
if (event.key === "Escape") {
|
|
18459
18459
|
if (stateRef.current.connection.isActive)
|
|
@@ -18491,7 +18491,7 @@ function XViewScene({
|
|
|
18491
18491
|
setRelationshipMenu((prev) => ({ ...prev, visible: false }));
|
|
18492
18492
|
}
|
|
18493
18493
|
if (event.key.toLowerCase() === "q") {
|
|
18494
|
-
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18494
|
+
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18495
18495
|
if (isUiClear) {
|
|
18496
18496
|
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
18497
18497
|
if (!isView) return;
|
|
@@ -18551,6 +18551,36 @@ function XViewScene({
|
|
|
18551
18551
|
setQuestMode({ isActive: true });
|
|
18552
18552
|
}
|
|
18553
18553
|
}
|
|
18554
|
+
const isArrowKey = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(event.key);
|
|
18555
|
+
if (isArrowKey) {
|
|
18556
|
+
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_d2 = context.versionMode) == null ? void 0 : _d2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18557
|
+
if (isUiClear) {
|
|
18558
|
+
const { controls } = stateRef.current;
|
|
18559
|
+
if (controls) {
|
|
18560
|
+
event.preventDefault();
|
|
18561
|
+
const rotateAngle = Math.PI / 36;
|
|
18562
|
+
const zoomScale = 1.1;
|
|
18563
|
+
if (event.key === "ArrowLeft") {
|
|
18564
|
+
controls.rotateLeft(rotateAngle);
|
|
18565
|
+
} else if (event.key === "ArrowRight") {
|
|
18566
|
+
controls.rotateLeft(-rotateAngle);
|
|
18567
|
+
} else if (event.key === "ArrowUp") {
|
|
18568
|
+
if (event.shiftKey) {
|
|
18569
|
+
controls.dollyIn(zoomScale);
|
|
18570
|
+
} else {
|
|
18571
|
+
controls.rotateUp(rotateAngle);
|
|
18572
|
+
}
|
|
18573
|
+
} else if (event.key === "ArrowDown") {
|
|
18574
|
+
if (event.shiftKey) {
|
|
18575
|
+
controls.dollyOut(zoomScale);
|
|
18576
|
+
} else {
|
|
18577
|
+
controls.rotateUp(-rotateAngle);
|
|
18578
|
+
}
|
|
18579
|
+
}
|
|
18580
|
+
controls.update();
|
|
18581
|
+
}
|
|
18582
|
+
}
|
|
18583
|
+
}
|
|
18554
18584
|
}
|
|
18555
18585
|
window.addEventListener("keydown", handleKeyDown);
|
|
18556
18586
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
package/dist/index.mjs
CHANGED
|
@@ -18509,7 +18509,7 @@ function XViewScene({
|
|
|
18509
18509
|
]);
|
|
18510
18510
|
useEffect24(() => {
|
|
18511
18511
|
function handleKeyDown(event) {
|
|
18512
|
-
var _a2, _b2, _c2;
|
|
18512
|
+
var _a2, _b2, _c2, _d2;
|
|
18513
18513
|
const context = actionHandlerContext;
|
|
18514
18514
|
if (event.key === "Escape") {
|
|
18515
18515
|
if (stateRef.current.connection.isActive)
|
|
@@ -18547,7 +18547,7 @@ function XViewScene({
|
|
|
18547
18547
|
setRelationshipMenu((prev) => ({ ...prev, visible: false }));
|
|
18548
18548
|
}
|
|
18549
18549
|
if (event.key.toLowerCase() === "q") {
|
|
18550
|
-
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18550
|
+
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_b2 = context.versionMode) == null ? void 0 : _b2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18551
18551
|
if (isUiClear) {
|
|
18552
18552
|
const isView = ((_c2 = viewParams == null ? void 0 : viewParams.type) == null ? void 0 : _c2.toLowerCase()) === "view";
|
|
18553
18553
|
if (!isView) return;
|
|
@@ -18607,6 +18607,36 @@ function XViewScene({
|
|
|
18607
18607
|
setQuestMode({ isActive: true });
|
|
18608
18608
|
}
|
|
18609
18609
|
}
|
|
18610
|
+
const isArrowKey = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"].includes(event.key);
|
|
18611
|
+
if (isArrowKey) {
|
|
18612
|
+
const isUiClear = !stateRef.current.creation.isActive && !stateRef.current.connection.isActive && !stateRef.current.relink.isActive && !stateRef.current.ancestry.isActive && !((_d2 = context.versionMode) == null ? void 0 : _d2.isActive) && !contextMenu.visible && !multiContextMenu.visible && !relationshipMenu.visible && !readingMode.isActive && !isImportModalOpen && !isBoardsOpen && !isSidebarOpen && !isMilestoneManagerOpen && !detailsNode && !detailsLink && !ancestryLinkDetails && !imageViewer.visible && !editingAncestryRel.visible && !questMode.isActive;
|
|
18613
|
+
if (isUiClear) {
|
|
18614
|
+
const { controls } = stateRef.current;
|
|
18615
|
+
if (controls) {
|
|
18616
|
+
event.preventDefault();
|
|
18617
|
+
const rotateAngle = Math.PI / 36;
|
|
18618
|
+
const zoomScale = 1.1;
|
|
18619
|
+
if (event.key === "ArrowLeft") {
|
|
18620
|
+
controls.rotateLeft(rotateAngle);
|
|
18621
|
+
} else if (event.key === "ArrowRight") {
|
|
18622
|
+
controls.rotateLeft(-rotateAngle);
|
|
18623
|
+
} else if (event.key === "ArrowUp") {
|
|
18624
|
+
if (event.shiftKey) {
|
|
18625
|
+
controls.dollyIn(zoomScale);
|
|
18626
|
+
} else {
|
|
18627
|
+
controls.rotateUp(rotateAngle);
|
|
18628
|
+
}
|
|
18629
|
+
} else if (event.key === "ArrowDown") {
|
|
18630
|
+
if (event.shiftKey) {
|
|
18631
|
+
controls.dollyOut(zoomScale);
|
|
18632
|
+
} else {
|
|
18633
|
+
controls.rotateUp(-rotateAngle);
|
|
18634
|
+
}
|
|
18635
|
+
}
|
|
18636
|
+
controls.update();
|
|
18637
|
+
}
|
|
18638
|
+
}
|
|
18639
|
+
}
|
|
18610
18640
|
}
|
|
18611
18641
|
window.addEventListener("keydown", handleKeyDown);
|
|
18612
18642
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lv-x-software-house/x_view",
|
|
3
|
-
"version": "1.2.6-dev.
|
|
3
|
+
"version": "1.2.6-dev.44",
|
|
4
4
|
"description": "Pacote privado contendo os componentes e lógica de renderização 3D do X View.",
|
|
5
5
|
"author": "iv.x - Engenharia de Software - ivxsoftwarehouse@gmail.com",
|
|
6
6
|
"license": "UNLICENSED",
|