@ship-ui/core 0.15.29 → 0.15.30
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.
|
@@ -1023,6 +1023,7 @@ class ShipBlueprintComponent {
|
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
1025
|
onTouchMove(event) {
|
|
1026
|
+
event.preventDefault();
|
|
1026
1027
|
if (this.isLocked())
|
|
1027
1028
|
return;
|
|
1028
1029
|
if (this.#isNodeDragging()) {
|
|
@@ -1035,6 +1036,11 @@ class ShipBlueprintComponent {
|
|
|
1035
1036
|
this.handleTouchMove(event);
|
|
1036
1037
|
}
|
|
1037
1038
|
}
|
|
1039
|
+
onDocumentTouchEnd(event) {
|
|
1040
|
+
if (this.isLocked())
|
|
1041
|
+
return;
|
|
1042
|
+
this.handleTouchEnd();
|
|
1043
|
+
}
|
|
1038
1044
|
startNodeDrag(event, nodeId) {
|
|
1039
1045
|
event.stopPropagation();
|
|
1040
1046
|
event.preventDefault();
|
|
@@ -1089,6 +1095,7 @@ class ShipBlueprintComponent {
|
|
|
1089
1095
|
this.#lastMouseY.set(clientY);
|
|
1090
1096
|
}
|
|
1091
1097
|
startPortDrag(event, nodeId, portId) {
|
|
1098
|
+
event.preventDefault();
|
|
1092
1099
|
event.stopPropagation();
|
|
1093
1100
|
if (this.draggingConnection())
|
|
1094
1101
|
this.cancelPortDrag();
|
|
@@ -1216,6 +1223,7 @@ class ShipBlueprintComponent {
|
|
|
1216
1223
|
}
|
|
1217
1224
|
}
|
|
1218
1225
|
handleTouchMove(event) {
|
|
1226
|
+
event.preventDefault();
|
|
1219
1227
|
if (event.touches.length === 1 && this.#isDragging()) {
|
|
1220
1228
|
const dx = event.touches[0].clientX - this.#lastMouseX();
|
|
1221
1229
|
const dy = event.touches[0].clientY - this.#lastMouseY();
|
|
@@ -1242,6 +1250,10 @@ class ShipBlueprintComponent {
|
|
|
1242
1250
|
}
|
|
1243
1251
|
handleTouchEnd() {
|
|
1244
1252
|
this.#isDragging.set(false);
|
|
1253
|
+
this.endNodeDrag();
|
|
1254
|
+
if (this.draggingConnection()) {
|
|
1255
|
+
this.cancelPortDrag();
|
|
1256
|
+
}
|
|
1245
1257
|
}
|
|
1246
1258
|
closeMidpointDiv() {
|
|
1247
1259
|
this.showMidpointDiv.set(false);
|
|
@@ -1422,7 +1434,7 @@ class ShipBlueprintComponent {
|
|
|
1422
1434
|
return Math.max(min, Math.min(max, value));
|
|
1423
1435
|
}
|
|
1424
1436
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ShipBlueprintComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1425
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipBlueprintComponent, isStandalone: true, selector: "sh-blueprint", inputs: { forceUnique: { classPropertyName: "forceUnique", publicName: "forceUnique", isSignal: true, isRequired: false, transformFunction: null }, autoLayout: { classPropertyName: "autoLayout", publicName: "autoLayout", isSignal: true, isRequired: false, transformFunction: null }, gridSize: { classPropertyName: "gridSize", publicName: "gridSize", isSignal: true, isRequired: false, transformFunction: null }, snapToGrid: { classPropertyName: "snapToGrid", publicName: "snapToGrid", isSignal: true, isRequired: false, transformFunction: null }, gridColor: { classPropertyName: "gridColor", publicName: "gridColor", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodes: "nodesChange" }, host: { listeners: { "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)", "document:keydown.escape": "onEscape($event)", "document:mousemove": "onMouseMove($event)", "document:touchmove": "onTouchMove($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["blueprintCanvas"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1437
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: ShipBlueprintComponent, isStandalone: true, selector: "sh-blueprint", inputs: { forceUnique: { classPropertyName: "forceUnique", publicName: "forceUnique", isSignal: true, isRequired: false, transformFunction: null }, autoLayout: { classPropertyName: "autoLayout", publicName: "autoLayout", isSignal: true, isRequired: false, transformFunction: null }, gridSize: { classPropertyName: "gridSize", publicName: "gridSize", isSignal: true, isRequired: false, transformFunction: null }, snapToGrid: { classPropertyName: "snapToGrid", publicName: "snapToGrid", isSignal: true, isRequired: false, transformFunction: null }, gridColor: { classPropertyName: "gridColor", publicName: "gridColor", isSignal: true, isRequired: false, transformFunction: null }, nodes: { classPropertyName: "nodes", publicName: "nodes", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { nodes: "nodesChange" }, host: { listeners: { "document:mouseup": "onMouseUp($event)", "document:click": "onClick($event)", "document:keydown.escape": "onEscape($event)", "document:mousemove": "onMouseMove($event)", "document:touchmove": "onTouchMove($event)", "document:touchend": "onDocumentTouchEnd($event)" } }, viewQueries: [{ propertyName: "canvasRef", first: true, predicate: ["blueprintCanvas"], descendants: true, static: true }], ngImport: i0, template: `
|
|
1426
1438
|
<div
|
|
1427
1439
|
class="canvas-container"
|
|
1428
1440
|
[class.locked]="isLocked()"
|
|
@@ -1622,6 +1634,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
1622
1634
|
}], onTouchMove: [{
|
|
1623
1635
|
type: HostListener,
|
|
1624
1636
|
args: ['document:touchmove', ['$event']]
|
|
1637
|
+
}], onDocumentTouchEnd: [{
|
|
1638
|
+
type: HostListener,
|
|
1639
|
+
args: ['document:touchend', ['$event']]
|
|
1625
1640
|
}] } });
|
|
1626
1641
|
|
|
1627
1642
|
class ShipButtonGroupComponent {
|