@colijnit/homedecorator 261.20.9 → 261.20.10

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.
@@ -44,6 +44,8 @@ canvas {
44
44
  }
45
45
 
46
46
  .hint {
47
+ pointer-events: all;
48
+ cursor: pointer;
47
49
  position: absolute;
48
50
  bottom: 20px;
49
51
  left: 50%;
@@ -23421,7 +23421,7 @@ class SceneEventService {
23421
23421
  this._eventService = _eventService;
23422
23422
  this._wallService = _wallService;
23423
23423
  this._configurationService = _configurationService;
23424
- this.intersectOffsetForWalls = 20;
23424
+ this.intersectOffsetForWalls = 0.1;
23425
23425
  this.longTouchDuration = 600;
23426
23426
  this.rotateNoDrag = false;
23427
23427
  this._mousePosition = new Vector2();
@@ -23841,8 +23841,7 @@ class SceneEventService {
23841
23841
  const intersects = this._getIntersections(this._mousePosition, this._itemService.getObjectPlanes(), { onlyVisible: true, includeFloors: false });
23842
23842
  const wallIntersect = this._wallIntersection(this._mousePosition);
23843
23843
  // object intersection is prioritized
23844
- if (intersects.length > 0 &&
23845
- ((wallIntersect && wallIntersect.distance + this.intersectOffsetForWalls > intersects[0].distance) || !wallIntersect)) {
23844
+ if (intersects.length > 0 && !this._behindWall(intersects[0], wallIntersect)) {
23846
23845
  this._toggleRotationHudIntersection(false);
23847
23846
  this._setIntersectedObject(intersects[0].object);
23848
23847
  }
@@ -23852,7 +23851,7 @@ class SceneEventService {
23852
23851
  if (snapperArea === null) {
23853
23852
  // check if intersects with configurable floor
23854
23853
  const floorIntersects = this._getIntersections(this._mousePosition, this._itemService.getObjectPlanes(), { onlyVisible: true, includeFloor: true, onlyConfigurableFloors: true });
23855
- if (floorIntersects.length > 0) {
23854
+ if (floorIntersects.length > 0 && !this._behindWall(floorIntersects[0], wallIntersect)) {
23856
23855
  this._toggleRotationHudIntersection(false);
23857
23856
  this._setIntersectedObject(floorIntersects[0].object);
23858
23857
  }
@@ -23869,6 +23868,9 @@ class SceneEventService {
23869
23868
  }
23870
23869
  }
23871
23870
  }
23871
+ _behindWall(intersection, wallIntersection) {
23872
+ return wallIntersection && intersection && wallIntersection.distance + this.intersectOffsetForWalls < intersection.distance;
23873
+ }
23872
23874
  // returns the first intersection object
23873
23875
  _itemIntersection(vec2, item) {
23874
23876
  let intersections = null;
@@ -36502,7 +36504,7 @@ class FloorplannerComponent {
36502
36504
  this._resetDrawing();
36503
36505
  this._coordinatesService.resetViewScale();
36504
36506
  this.resizeView();
36505
- this._setDefaultMode();
36507
+ this.setDefaultMode();
36506
36508
  this._coordinatesService.resetOrigin();
36507
36509
  this._requestDraw();
36508
36510
  }
@@ -36540,7 +36542,7 @@ class FloorplannerComponent {
36540
36542
  this.selectedMode = mode;
36541
36543
  // this.setMode(mode);
36542
36544
  }
36543
- _setDefaultMode() {
36545
+ setDefaultMode() {
36544
36546
  this._resetDrawing();
36545
36547
  // this.setMode(this.selectedMode);
36546
36548
  this.modeService.resetToSelectedMode();
@@ -36563,6 +36565,7 @@ class FloorplannerComponent {
36563
36565
  this._mouseDownPosition.copy(RelativePositionUtils.GetClientMousePosition(event));
36564
36566
  const hasActive = this._activeWall || this._activeCorner || this._activeItem;
36565
36567
  if (event.button === 2) {
36568
+ this.setDefaultMode();
36566
36569
  this._modeBeforeRightMouseMove = this.mode;
36567
36570
  this.mode = FloorplannerMode.CameraMoving;
36568
36571
  return;
@@ -36619,7 +36622,7 @@ class FloorplannerComponent {
36619
36622
  // detect mouseClick
36620
36623
  if (!this._hasMouseMoved(event)) {
36621
36624
  if (this._mouseClickHandled(event)) {
36622
- this._setDefaultMode();
36625
+ this.setDefaultMode();
36623
36626
  }
36624
36627
  }
36625
36628
  // moving
@@ -36637,7 +36640,7 @@ class FloorplannerComponent {
36637
36640
  this.mode = this._modeBeforeRightMouseMove;
36638
36641
  }
36639
36642
  else {
36640
- this._setDefaultMode();
36643
+ this.setDefaultMode();
36641
36644
  }
36642
36645
  }
36643
36646
  this._requestDraw();
@@ -36664,7 +36667,7 @@ class FloorplannerComponent {
36664
36667
  this._handleDrawingMouseUp();
36665
36668
  }
36666
36669
  if (this.mode === FloorplannerMode.CameraMove || this.mode === FloorplannerMode.CameraMoving) {
36667
- this._setDefaultMode();
36670
+ this.setDefaultMode();
36668
36671
  }
36669
36672
  this._requestDraw();
36670
36673
  }
@@ -36802,7 +36805,7 @@ class FloorplannerComponent {
36802
36805
  // end panning
36803
36806
  if (this.mode === FloorplannerMode.CameraMove ||
36804
36807
  this.mode === FloorplannerMode.CameraMoving) {
36805
- this._setDefaultMode();
36808
+ this.setDefaultMode();
36806
36809
  }
36807
36810
  }
36808
36811
  handleTouchEnd(event) {
@@ -36813,7 +36816,7 @@ class FloorplannerComponent {
36813
36816
  // end panning
36814
36817
  if (this.mode === FloorplannerMode.CameraMove ||
36815
36818
  this.mode === FloorplannerMode.CameraMoving) {
36816
- this._setDefaultMode();
36819
+ this.setDefaultMode();
36817
36820
  }
36818
36821
  }
36819
36822
  }
@@ -36858,7 +36861,7 @@ class FloorplannerComponent {
36858
36861
  switch (event.keyCode) {
36859
36862
  case Key.Esc:
36860
36863
  case Key.Space:
36861
- this._setDefaultMode();
36864
+ this.setDefaultMode();
36862
36865
  break;
36863
36866
  case Key.Delete:
36864
36867
  this._removeWall();
@@ -37036,7 +37039,7 @@ class FloorplannerComponent {
37036
37039
  else {
37037
37040
  this._selectFloor(event, this._bluePrintService.overlappedFloor(this._mouseX, this._mouseY));
37038
37041
  }
37039
- this._setDefaultMode();
37042
+ this.setDefaultMode();
37040
37043
  return true;
37041
37044
  }
37042
37045
  this._unselect();
@@ -37058,7 +37061,7 @@ class FloorplannerComponent {
37058
37061
  }
37059
37062
  _selectWall(event, wall) {
37060
37063
  this._selectedWall = wall;
37061
- this.selectedWallChange.next({ event: event, wall: this._selectedWall });
37064
+ this.selectedWallChange.next({ event: event, wall: this._selectedWall, front: true });
37062
37065
  this._requestDraw();
37063
37066
  }
37064
37067
  _selectCorner(event, corner) {
@@ -37083,7 +37086,7 @@ class FloorplannerComponent {
37083
37086
  if (this._lastMouseUpTimestamp &&
37084
37087
  currentTimestamp < this._lastMouseUpTimestamp + doubleClickDurationMs) {
37085
37088
  this._lastMouseUpTimestamp = null;
37086
- this._setDefaultMode();
37089
+ this.setDefaultMode();
37087
37090
  }
37088
37091
  else {
37089
37092
  this._lastMouseUpTimestamp = currentTimestamp;
@@ -37136,7 +37139,7 @@ class FloorplannerComponent {
37136
37139
  }
37137
37140
  const newNumRooms = this._bluePrintService.getRooms() ? this._bluePrintService.getRooms().length : 0;
37138
37141
  if (newNumRooms > prevNumRooms) {
37139
- this._setDefaultMode();
37142
+ this.setDefaultMode();
37140
37143
  }
37141
37144
  else {
37142
37145
  this._lastNode = corner;
@@ -37298,7 +37301,7 @@ class FloorplannerComponent {
37298
37301
  </mat-button-toggle>
37299
37302
  </div>
37300
37303
  @if (mode === floorplannerMode.Drawing) {
37301
- <div class="hint" (click)="changeFloorplannerMode(floorplannerMode.Draw)">
37304
+ <div class="hint" (click)="setDefaultMode()">
37302
37305
  {{ 'CLICK_HERE_TO_EXIT_DRAWING_MODE_OR_PRESS_THE_ESC_KEY' | localize }}
37303
37306
  </div>
37304
37307
  }
@@ -37308,7 +37311,7 @@ class FloorplannerComponent {
37308
37311
  {{ 'TAB_ANYWHERE_TO_START' | localize }}
37309
37312
  </div>
37310
37313
  }
37311
- `, isInline: true, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"], dependencies: [{ kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: WallLengthInputComponent, selector: "wall-length-input" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
37314
+ `, isInline: true, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{pointer-events:all;cursor:pointer;position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"], dependencies: [{ kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "component", type: i12.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i12.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.IconComponent, selector: "co-icon", inputs: ["icon", "iconData"] }, { kind: "component", type: WallLengthInputComponent, selector: "wall-length-input" }, { kind: "pipe", type: LocalizePipe, name: "localize" }] }); }
37312
37315
  }
37313
37316
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FloorplannerComponent, decorators: [{
37314
37317
  type: Component,
@@ -37371,7 +37374,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
37371
37374
  </mat-button-toggle>
37372
37375
  </div>
37373
37376
  @if (mode === floorplannerMode.Drawing) {
37374
- <div class="hint" (click)="changeFloorplannerMode(floorplannerMode.Draw)">
37377
+ <div class="hint" (click)="setDefaultMode()">
37375
37378
  {{ 'CLICK_HERE_TO_EXIT_DRAWING_MODE_OR_PRESS_THE_ESC_KEY' | localize }}
37376
37379
  </div>
37377
37380
  }
@@ -37381,7 +37384,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
37381
37384
  {{ 'TAB_ANYWHERE_TO_START' | localize }}
37382
37385
  </div>
37383
37386
  }
37384
- `, standalone: false, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"] }]
37387
+ `, standalone: false, styles: [":host{display:flex;height:100%;width:100%;background:#fff}:host.hidden{visibility:hidden}canvas{width:inherit;height:inherit}.controls-top{pointer-events:none;position:absolute;top:80px;width:100%;display:flex;align-items:center;justify-content:center}.controls-top:not(.disable-mouse)>*{pointer-events:all;margin:0 3px}.controls-top:not(.disable-mouse)>* .mdc-floating-label,.controls-top:not(.disable-mouse)>*.dimensioning-select,.controls-top:not(.disable-mouse)>*.round-select{pointer-events:all}.controls-top .mat-mdc-floating-label.mdc-floating-label{pointer-events:none!important}.controls-top .dimensioning-select,.controls-top .round-select{pointer-events:none;height:38px;width:70px;padding:5px;border:solid 1px rgba(0,0,0,.12);border-radius:3px;background:#fff}.hint{pointer-events:all;cursor:pointer;position:absolute;bottom:20px;left:50%;margin-left:-200px;padding:10px 20px;background:#74b77f;border:1px solid #cccccc;border-radius:3px;text-align:center}.mat-button-toggle-checked{color:#fff;background-color:#da9803}.mat-button-toggle-checked co-icon ::ng-deep svg{fill:#fff}.mat-button-toggle-checked co-icon ::ng-deep [fill]{fill:#fff}.mat-button-toggle ::ng-deep .mat-button-toggle-label-content{width:48px;height:48px;display:flex;align-items:center;justify-content:center;padding:0}.mat-button-toggle ::ng-deep co-icon ::ng-deep{width:24px;height:24px}\n"] }]
37385
37388
  }], ctorParameters: () => [{ type: HomedecoratorIconCacheService }, { type: FloorplanModeService }, { type: MessageBusService }, { type: ConfigurationService }, { type: ViewModeService }, { type: BluePrintService }, { type: HomedecoratorSettingsService }, { type: FloorplanCoordinatesService }, { type: FloorplanRenderService }], propDecorators: { canvasElement: [{
37386
37389
  type: ViewChild,
37387
37390
  args: ['floorplannerCanvas', { read: ElementRef, static: true }]
@@ -38478,12 +38481,7 @@ class TextureEditorComponent {
38478
38481
  }
38479
38482
  async initializeTexture() {
38480
38483
  let texture;
38481
- if (this.texturePlane && this.texturePlane.getTexture() !== undefined) {
38482
- texture = this.texturePlane.getTexture();
38483
- }
38484
- else {
38485
- texture = this.plainTexture;
38486
- }
38484
+ texture = this.texturePlane ? this.texturePlane : this.plainTexture;
38487
38485
  if (texture) {
38488
38486
  await this._loadTextureData(texture, false);
38489
38487
  }
@@ -39840,8 +39838,8 @@ class AppearanceSectionComponent {
39840
39838
  this.selectedTabIndex = index;
39841
39839
  }
39842
39840
  loadTexture() {
39843
- const texture = this.texturePlane ? this.texturePlane.getTexture() : this.plainTexture;
39844
- const color = this.texturePlane ? this.texturePlane.getColor() : this.color;
39841
+ const texture = this.texturePlane ? this.texturePlane : this.plainTexture;
39842
+ const color = this.texturePlane && this.texturePlane.color ? parseInt(this.texturePlane.color, 0) : this.color;
39845
39843
  this.updateColor(color, { update3d: false });
39846
39844
  this.updateTexture(texture, { update3d: false });
39847
39845
  }
@@ -39877,8 +39875,8 @@ class AppearanceSectionComponent {
39877
39875
  this.texture = texture;
39878
39876
  if (update3d) {
39879
39877
  this.setTexture.emit(this.texture);
39880
- if (this.texturePlane) {
39881
- this.color = this.texturePlane.getColor();
39878
+ if (this.texturePlane && this.texturePlane.color) {
39879
+ this.color = parseInt(this.texturePlane.color, 0);
39882
39880
  }
39883
39881
  }
39884
39882
  }
@@ -39889,8 +39887,8 @@ class AppearanceSectionComponent {
39889
39887
  this.texture = null;
39890
39888
  if (update3d) {
39891
39889
  this.setTexture.emit(this.texture);
39892
- if (this.texturePlane) {
39893
- this.color = this.texturePlane.getColor();
39890
+ if (this.texturePlane && this.texturePlane.color) {
39891
+ this.color = parseInt(this.texturePlane.color, 0);
39894
39892
  }
39895
39893
  }
39896
39894
  }