Merge branch 'main' of https://github.com/interplug-team/q.cast.prototype.nontype into feature/test
This commit is contained in:
commit
8bb3b38fcc
@ -105,3 +105,22 @@ export function addDistanceTextToPolygon(polygon) {
|
|||||||
selectable: true,
|
selectable: true,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {number} value
|
||||||
|
* @param {boolean} useDefault
|
||||||
|
* @param {string} delimeter
|
||||||
|
* @returns
|
||||||
|
* ex) 1,100 mm
|
||||||
|
*/
|
||||||
|
export const formattedWithComma = (value, unit = 'mm') => {
|
||||||
|
let formatterdData = value.toLocaleString('ko-KR')
|
||||||
|
if (unit === 'cm') {
|
||||||
|
formatterdData = value.toLocaleString('ko-KR') / 10
|
||||||
|
} else if (unit === 'm') {
|
||||||
|
formatterdData = value.toLocaleString('ko-KR') / 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
return `${formatterdData} ${unit}`
|
||||||
|
}
|
||||||
|
|||||||
@ -280,7 +280,7 @@ export default function Roof() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="flex justify-center my-8">
|
<div className="flex justify-center my-8 w-full">
|
||||||
<button
|
<button
|
||||||
className="w-30 mx-2 p-2 rounded bg-blue-500 text-white"
|
className="w-30 mx-2 p-2 rounded bg-blue-500 text-white"
|
||||||
onClick={addRect}
|
onClick={addRect}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user