diff --git a/build/js/app.js b/build/js/app.js index fb05a0b..6d7230b 100644 --- a/build/js/app.js +++ b/build/js/app.js @@ -708,6 +708,10 @@ function datGUI(three, floorplanner) f.add(BP3DJS.wallInformation, 'exterior').name('Exterior'); f.add(BP3DJS.wallInformation, 'interior').name('Interior'); f.add(BP3DJS.wallInformation, 'midline').name('Midline'); + f.add(BP3DJS.wallInformation, 'labels').name('Labels'); + f.add(BP3DJS.wallInformation, 'exteriorlabel').name('Label for Exterior'); + f.add(BP3DJS.wallInformation, 'interiorlabel').name('Label for Interior'); + f.add(BP3DJS.wallInformation, 'midlinelabel').name('Label for Midline'); cameraPropFolder = getCameraRangePropertiesFolder(gui, aCameraRange); wallPropFolder = getWallAndFloorPropertiesFolder(gui, aWall); diff --git a/build/js/bp3djs.js b/build/js/bp3djs.js index fae429a..3542c10 100644 --- a/build/js/bp3djs.js +++ b/build/js/bp3djs.js @@ -48982,7 +48982,7 @@ var BP3DJS = (function (exports) { var config = { dimUnit: dimCentiMeter, wallHeight: 250, wallThickness: 10, systemUI: false }; - var wallInformation = { exterior: true, interior: true, midline: true }; + var wallInformation = { exterior: true, interior: true, midline: true, labels: true, exteriorlabel: 'e:', interiorlabel: 'i:', midlinelabel: 'm:' }; /** Global configuration to customize the whole system. */ var Configuration = function () { @@ -117903,7 +117903,8 @@ var BP3DJS = (function (exports) { // dont draw labels on walls this short return; } - this.drawTextLabel('m:' + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y)); + var label = !wallInformation.labels ? '' : wallInformation.midlinelabel; + this.drawTextLabel('' + label + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y)); } /** */ @@ -117918,7 +117919,8 @@ var BP3DJS = (function (exports) { return; } if (wallInformation.exterior) { - this.drawTextLabel('e:' + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y + 40)); + var label = !wallInformation.labels ? '' : wallInformation.exteriorlabel; + this.drawTextLabel('' + label + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y + 40)); } } @@ -117934,7 +117936,8 @@ var BP3DJS = (function (exports) { return; } if (wallInformation.interior) { - this.drawTextLabel('i:' + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y - 40)); + var label = !wallInformation.labels ? '' : wallInformation.interiorlabel; + this.drawTextLabel('' + label + Dimensioning.cmToMeasure(length), this.viewmodel.convertX(pos.x), this.viewmodel.convertY(pos.y - 40)); } } }, { diff --git a/src/scripts/core/configuration.js b/src/scripts/core/configuration.js index 2ab510e..1777cdb 100644 --- a/src/scripts/core/configuration.js +++ b/src/scripts/core/configuration.js @@ -13,7 +13,7 @@ export const configSystemUI = 'systemUI'; export var config = {dimUnit: dimCentiMeter, wallHeight: 250, wallThickness: 10, systemUI: false}; -export var wallInformation = {exterior: true, interior: true, midline: true}; +export var wallInformation = {exterior: true, interior: true, midline: true, labels: true, exteriorlabel:'e:', interiorlabel:'i:', midlinelabel:'m:'}; /** Global configuration to customize the whole system. */ export class Configuration diff --git a/src/scripts/floorplanner/floorplanner_view.js b/src/scripts/floorplanner/floorplanner_view.js index 87c5e75..9d7d680 100644 --- a/src/scripts/floorplanner/floorplanner_view.js +++ b/src/scripts/floorplanner/floorplanner_view.js @@ -205,7 +205,8 @@ export class FloorplannerView2D // dont draw labels on walls this short return; } - this.drawTextLabel(`m:${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y)); + var label = (!wallInformation.labels)?'':wallInformation.midlinelabel; + this.drawTextLabel(`${label}${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y)); } /** */ @@ -220,7 +221,8 @@ export class FloorplannerView2D } if(wallInformation.exterior) { - this.drawTextLabel(`e:${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y+40)); + var label = (!wallInformation.labels)?'':wallInformation.exteriorlabel; + this.drawTextLabel(`${label}${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y+40)); } } @@ -236,7 +238,8 @@ export class FloorplannerView2D } if(wallInformation.interior) { - this.drawTextLabel(`i:${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y-40)); + var label = (!wallInformation.labels)?'':wallInformation.interiorlabel; + this.drawTextLabel(`${label}${Dimensioning.cmToMeasure(length)}` ,this.viewmodel.convertX(pos.x),this.viewmodel.convertY(pos.y-40)); } }