Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
921f79b
update vue files to composition api
May 18, 2026
b37a342
Merge branch 'main' of https://github.com/linusbbb/set into vue-migra…
May 18, 2026
81fabab
update remaining vue files to composition api
May 26, 2026
5abc116
Merge remote-tracking branch 'origin/main' into vue-migration-to-comp…
May 26, 2026
837b88e
trigger CI
May 26, 2026
975a9a4
remove unused props and components, add missing JSDoc
May 28, 2026
1414ec8
fix typo in settings editor
May 28, 2026
c695db0
declare all functions with "function" instead of "const" arrow functions
Jun 2, 2026
5b0e6b0
replaced concatenated strings with interpolation
Jun 2, 2026
3b3bbc2
replaced another concatenated string with interpolation
Jun 2, 2026
57b1650
use template ref instead of DOM calls in vue components
Jun 3, 2026
8328a0e
fix svg icons rendering instead of showing as plain text
Jun 3, 2026
d6d7fcd
Merge branch 'eclipse-set:main' into vue-migration-to-composition-api
linusbbb Jun 4, 2026
187fd24
fix order of functions in several files
Jun 9, 2026
4d390b5
add typecheck for siteplan
mariusheine Jun 11, 2026
c82d452
resolve most comments
Jun 16, 2026
ec3b8a7
turn getFeatures into computed
Jun 17, 2026
d1a0a56
rename "getType" computed to "type"
Jun 17, 2026
83dafc8
get rid of DOM calls
Jun 17, 2026
2d040f4
remove type casts for refs
Jun 17, 2026
6ec524c
use computeds instead of functions
Jun 17, 2026
0690909
specify feature type
Jun 17, 2026
0b764f3
replace functions with computeds
Jun 17, 2026
73450e4
add computed for draw()
Jun 17, 2026
e20d7f8
make ref types null safe, simplify watch() block
Jun 17, 2026
b4d6b6b
allow props to be null
Jun 17, 2026
e0ca3e0
computed const html like in SignalBruecke.vue
Jun 17, 2026
235ae9d
fix type mismatches in vue components
Jun 22, 2026
7cd745b
add optional chaining to track switch label
Jun 22, 2026
2a66e3c
add safer emits declaration in MenuPopup and SvgKatalog components
Jun 22, 2026
d348aa7
Merge branch 'eclipse-set:main' into vue-migration-to-composition-api
linusbbb Jun 22, 2026
647e678
remove generic param for VectorSource
Jun 22, 2026
5b315b3
add null checks for OL image calls
Jun 23, 2026
f0d79f0
add missing import for FeatureExtensions
Jun 23, 2026
a747287
add more null safety to resolve typescript problems
Jun 23, 2026
9fef2a2
use nullish oalescing operator
Jun 23, 2026
9148d15
add HTMLImageElement cast to tile image
Jun 23, 2026
1e44e53
fix type mismatches in PlanProToolbox and StationFaeture
Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ on:
- 'main'

jobs:
typecheck-siteplan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: Install dependencies
run: npm ci
working-directory: web/siteplan

- name: Run typecheck
run: npm run typecheck
working-directory: web/siteplan

test-siteplan:
runs-on: ubuntu-latest
steps:
Expand Down
86 changes: 85 additions & 1 deletion web/siteplan/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions web/siteplan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "vite build --mode development",
"build-prod": "vite build --mode production",
"lint": "eslint src",
"test:e2e": "playwright test"
"test:e2e": "playwright test",
"typecheck": "vue-tsc --noEmit"
},
"dependencies": {
"@turf/boolean-disjoint": "^7.3.5",
Expand Down Expand Up @@ -42,6 +43,7 @@
"eslint-plugin-vue": "^10.8.0",
"tslib": "^2.8.1",
"typescript": "^6.0.3",
"vite": "^8.0.8"
"vite": "^8.0.8",
"vue-tsc": "^3.3.4"
}
}
101 changes: 49 additions & 52 deletions web/siteplan/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,67 @@
</div>
</div>
</template>
<script lang="ts">
<script setup lang="ts">
import Menubar from '@/components/toolbar/Menubar.vue'
import Toolbar from '@/components/toolbar/Toolbar.vue'
import axios from 'axios'
import { Options, Vue } from 'vue-class-component'
import { onMounted, ref } from 'vue'
import SvgCatalogService from './service/SvgCatalogService'
import { store } from './store'
import Configuration from './util/Configuration'
import PlanProToolboxTest from './util/PlanProToolboxTest'
import { ToolboxConfiguration } from './util/ToolboxConfiguration'
@Options({
async created () {
store.commit('setLoading', true)
// Download the siteplan font
await axios({
method: 'GET',
url: 'font',
responseType: 'blob'
})
.then(response => {
const reader = new FileReader()
reader.onload = () => {
store.commit(
'setSiteplanfont',
`

const isShowMenu = ref(false)
const loading = ref(true)

function showMenu (value: boolean): void {
isShowMenu.value = value
}

onMounted (async () => {
store.commit('setLoading', true)
// Download the siteplan font
await axios({
method: 'GET',
url: 'font',
responseType: 'blob'
})
.then(response => {
const reader = new FileReader()
reader.onload = () => {
store.commit(
'setSiteplanfont',
`
@font-face {
font-family: 'siteplanfont';
src: url('${reader.result}') format('truetype');
}`
)
}
reader.readAsDataURL(new Blob([response.data]))
})
.catch(() => {
console.warn('Siteplan Font not available')
})
// Wait until the svg catalog service is ready
await SvgCatalogService.getInstance().isReady()
// Download the toolbox configuration
await axios
.get<ToolboxConfiguration>('/configuration.json')
.then(response => {
store.commit('setpptConfiguration', response.data)
store.commit('setSheetCutCRS', response.data.defaultSheetCutCRS)
store.commit('setPlanProModelType', response.data.planproModelType)
// run unit tests
if (Configuration.developmentMode()) {
PlanProToolboxTest.run()
}
)
}
reader.readAsDataURL(new Blob([response.data]))
})
.catch(() => {
console.warn('Siteplan Font not available')
})
// Wait until the svg catalog service is ready
await SvgCatalogService.getInstance().isReady()
// Download the toolbox configuration
await axios
.get<ToolboxConfiguration>('/configuration.json')
.then(response => {
store.commit('setpptConfiguration', response.data)
store.commit('setSheetCutCRS', response.data.defaultSheetCutCRS)
store.commit('setPlanProModelType', response.data.planproModelType)
// run unit tests
if (Configuration.developmentMode()) {
PlanProToolboxTest.run()
}

this.loading = false
})
},
components: {
Toolbar,
Menubar
}
loading.value = false
})
})
export default class App extends Vue {
isShowMenu = false
altClientHeight = 0
loading = true

showMenu (value: boolean): void {
this.isShowMenu = value
}
}
</script>
<style>
html,
Expand All @@ -95,13 +89,16 @@ body {
height: 100vh;
flex-direction: column;
}

#view {
display: flex;
flex: 1;
}

#menubar {
flex-grow: 1;
}

#mainView {
flex-grow: 5;
}
Expand Down
4 changes: 2 additions & 2 deletions web/siteplan/src/collision/CollisionDetection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class CollisionDetection {
* @returns a list of collisions between groups of features
*/
public getCollisions (bboxFeatures: Feature<Geometry>[]): Collision[] {
const layer = new VectorSource<Geometry>()
const layer = new VectorSource()
layer.addFeatures(bboxFeatures)
const featuresIntersectExtent = new Array<Feature<Geometry>[]>()
const collisions: Collision[] = []
Expand Down Expand Up @@ -86,7 +86,7 @@ export default class CollisionDetection {
* @returns outer intersection features
*/
private getIntersectFeaturesByExtent (
layer: VectorSource<Geometry>,
layer: VectorSource,
feature: Feature<Geometry>
) : Feature<Geometry>[] {
const overlapFeatures = new Array<Feature<Geometry>>()
Expand Down
2 changes: 1 addition & 1 deletion web/siteplan/src/collision/CollisionFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface CollisionFeatureData {
export default class CollisionFeature {
public static addCollisionFeatures (layers: NamedFeatureLayer[]) {
const features = layers.map(layer => layer.getSource())
.filter((c): c is VectorSource<Geometry> => c != null)
.filter((c): c is VectorSource => c != null)
.flatMap(c => c.getFeatures())

const layer = layers.find(c => c.getLayerType() === FeatureLayerType.Collision)
Expand Down
Loading
Loading