@itwin/measure-tools-react
Version:
Frontend framework and tools for measurements
21 lines • 948 B
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
import { MeasureTools } from "../MeasureTools.js";
export class MeasurementPropertyHelper {
static buildNameProperty(name) {
return {
label: MeasureTools.localization.getLocalizedString("MeasureTools:Generic.name"),
name: "Measurement_Name",
value: name,
};
}
static tryAddNameProperty(measurement, properties) {
if (!measurement.label)
return false;
properties.push(MeasurementPropertyHelper.buildNameProperty(measurement.label));
return true;
}
}
//# sourceMappingURL=MeasurementPropertyHelper.js.map