Compare commits

..

3 Commits

Author SHA1 Message Date
semantic-release-bot
b1db4ea590 chore(release): 7.1.1 [skip ci]
## [7.1.1](https://git.datacontroller.io/dc/dc/compare/v7.1.0...v7.1.1) (2025-07-24)

### Bug Fixes

* **viewboxes:** hot v16 fails to load because of relative height `100%` ([672dd6d](672dd6d4f1))
2025-07-24 11:46:09 +00:00
822ddb1274 Merge pull request 'fix(viewboxes): hot v16 fails to load because of relative height 100%' (#183) from hot16-viewboxes into main
All checks were successful
Release / Build-production-and-ng-test (push) Successful in 3m50s
Release / Build-and-test-development (push) Successful in 9m17s
Release / release (push) Successful in 8m4s
Reviewed-on: #183
2025-07-24 11:29:33 +00:00
M
672dd6d4f1 fix(viewboxes): hot v16 fails to load because of relative height 100%
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m55s
Build / Build-and-test-development (pull_request) Successful in 8m27s
2025-07-24 13:12:15 +02:00
4 changed files with 59 additions and 3 deletions

View File

@@ -1,3 +1,10 @@
## [7.1.1](https://git.datacontroller.io/dc/dc/compare/v7.1.0...v7.1.1) (2025-07-24)
### Bug Fixes
* **viewboxes:** hot v16 fails to load because of relative height `100%` ([672dd6d](https://git.datacontroller.io/dc/dc/commit/672dd6d4f1fda27e3706dd7caa42b45922319497))
# [7.1.0](https://git.datacontroller.io/dc/dc/compare/v7.0.3...v7.1.0) (2025-07-23)

View File

@@ -401,7 +401,7 @@
[columns]="viewboxTables[viewboxTableIndex].hotTable.columns"
[filters]="true"
[dropdownMenu]="viewboxTables[viewboxTableIndex].hotTable.dropdownMenu"
[height]="viewboxTables[viewboxTableIndex].hotTable.height"
[height]="calculateTableHeight(viewbox)"
stretchH="all"
[cells]="viewboxTables[viewboxTableIndex].hotTable.cells"
[maxRows]="viewboxTables[viewboxTableIndex].hotTable.maxRows"

View File

@@ -111,7 +111,7 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
},
columns: [],
cols: [],
height: '100%',
height: 200, //WORKAROUND: Changed from '100%' to fixed pixel value because otherwize hot does not load
settings: {},
hiddenColumns: true,
manualColumnMove: false,
@@ -513,6 +513,11 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
this.helperService.debounceCall(1000, () => {
this.viewboxChanged()
this.eventService.dispatchEvent('resize')
// Refresh all viewbox tables after resize
this.viewboxes.forEach((viewbox) => {
this.refreshTableAfterResize(viewbox)
})
})
return {
@@ -672,6 +677,11 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
setTimeout(() => {
this.setAllHandleTransform()
// Refresh all tables after snap to grid
this.viewboxes.forEach((viewbox) => {
this.refreshTableAfterResize(viewbox)
})
})
}
@@ -713,6 +723,11 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
viewbox.minimized = false
this.viewboxChanged()
// Refresh table after restoring
setTimeout(() => {
this.refreshTableAfterResize(viewbox)
}, 100)
}
collapse(viewbox: Viewbox) {
@@ -723,6 +738,11 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
expand(viewbox: Viewbox) {
viewbox.collapsed = false
this.viewboxChanged()
// Refresh table after expanding
setTimeout(() => {
this.refreshTableAfterResize(viewbox)
}, 100)
}
/**
@@ -1158,6 +1178,35 @@ export class ViewboxesComponent implements OnInit, AfterViewInit, OnDestroy {
}
}
/**
* WORKAROUND: This is a workaround to calculate the height of the table since `100%`
* makes hot not load
* Calculate available height for Handsontable
* @param viewbox The viewbox to calculate height for
* @returns Available height in pixels
*/
calculateTableHeight(viewbox: Viewbox): number {
// Calculate the exact height of the content div
const dragHandleHeight = 20
const searchFormHeight = 38
// Return the exact remaining height for the table
return viewbox.height - dragHandleHeight - searchFormHeight
}
/**
* Refresh Handsontable instance after resize
* @param viewbox The viewbox to refresh
*/
refreshTableAfterResize(viewbox: Viewbox): void {
const hotInstance = this.getViewboxHotInstance(viewbox.id)
if (hotInstance) {
// Force the table to recalculate its dimensions
setTimeout(() => {
hotInstance.refreshDimensions()
}, 100)
}
}
/**
*
* @param viewboxId

View File

@@ -1,6 +1,6 @@
{
"name": "dcfrontend",
"version": "7.1.0",
"version": "7.1.1",
"description": "Data Controller",
"devDependencies": {
"@saithodev/semantic-release-gitea": "^2.1.0",