/**
|
* ConfigurationManager.js
|
*/
|
|
const defaultConfiguration = {
|
//new
|
show_disabled_property_buttons: false,
|
interior_property: false,
|
panel_right_show_proggroup_selection: false,
|
disable_right_click: false,
|
enable_measure_box: false,
|
show_measure_box_default: false,
|
enable_measure_walls: false,
|
enable_shoppingcart: false,
|
enable_help: false,
|
disable_drag_n_drop: false,
|
|
disable_move_x_object: true,
|
disable_move_y_object: true,
|
disable_move_z_object: false,
|
|
//old
|
toolbar_show: true,
|
toolbar_button_info: true,
|
toolbar_button_logout: true,
|
toolbar_button_furnview_app: true,
|
toolbar_button_fullscreen: true,
|
toolbar_button_pickMode: true,
|
toolbar_button_resetCamera: true,
|
toolbar_button_camera_reset_front: true,
|
toolbar_button_takeScreenshot: true,
|
toolbar_button_front: true,
|
toolbar_button_accessoires: false,
|
toolbar_button_rendering: false,
|
toolbar_button_animation: true,
|
toolbar_button_zoom: true,
|
toolbar_button_translate: true,
|
toolbar_button_finish_planning: true,
|
toolbar_button_homeviewer_finish_planning: false,
|
toolbar_button_renderSettings: true,
|
toolbar_button_ar: true,
|
|
toolbar_furnplan_toolbar: true,
|
|
sidebar_show_toggler: true,
|
|
panel_right_show: true,
|
panel_right_show_manufacturer_selection: false,
|
panel_right_show_program_selection: false,
|
panel_right_show_programimages_selection: false,
|
panel_right_show_section_selection: false,
|
panel_right_show_categoryIdm_selection: false,
|
panel_right_openInitially_do: true,
|
panel_right_none_full_height: false,
|
cameraRotationPoint: "center",
|
panel_right_openInitially_register: "scene",
|
webui_mode: false,
|
panel_right_register_scene: false,
|
panel_right_register_old_kata_tree: true,
|
panel_right_register_old_accessories: true,
|
panel_right_register_old_wall_selection: true,
|
panel_right_register_old_furnray: true,
|
panel_right_register_kata_tree: false,
|
panel_right_register_kata_tree_generic: false,
|
panel_right_register_accessoires_generic: false,
|
panel_right_register_properties: false,
|
panel_right_register_floor: false,
|
panel_right_register_wall: false,
|
panel_right_register_hybrid_reality: false,
|
panel_right_register_interior_design: false,
|
panel_right_register_analysis: false,
|
panel_right_show_dimensions_list: false,
|
panel_right_show_article_input: false,
|
|
manage_article_contexts: false,
|
|
panel_right_register_custom_roompage: false,
|
custom_roompage_enable_wall_and_floor_properties: false,
|
custom_roompage_enable_door_selection: false,
|
custom_roompage_enable_window_selection: false,
|
|
|
old_kata_tree_show_toolbar: true,
|
|
old_kata_tree_toolbar_grid: true,
|
old_kata_tree_toolbar_placer: true,
|
old_kata_tree_toolbar_cloud: true,
|
old_kata_tree_toolbar_new_scene: true,
|
old_kata_tree_toolbar_project_manager: true,
|
old_kata_tree_toolbar_redlining: true,
|
old_kata_tree_toolbar_print: true,
|
old_kata_tree_toolbar_mhs_print: false,
|
old_kata_tree_toolbar_undo: true,
|
old_kata_tree_toolbar_reload: true,
|
old_kata_tree_toolbar_manufacturer: true,
|
old_kata_tree_toolbar_manufacturer_editable: true,
|
old_kata_tree_toolbar_share: false,
|
old_kata_tree_toolbar_customer_project_manager: false,
|
old_kata_tree_toolbar_cloud_download: false,
|
|
old_kata_tree_show_program_selection: true,
|
old_kata_tree_show_article_input_line: true,
|
old_kata_tree_show_category_list: true,
|
|
old_kata_tree_show_wall_simple: true,
|
old_kata_tree_show_wall_individual: true,
|
old_kata_tree_show_wall_tex: true,
|
old_kata_tree_show_wall_window: true,
|
old_kata_tree_show_wall_door: true,
|
old_kata_tree_show_wall_free_edit: true,
|
old_kata_tree_show_wall_wall_copy: true,
|
old_kata_tree_show_wall_del_wall: true,
|
old_kata_tree_show_wall_del_all_walls: true,
|
old_kata_tree_show_wall_del_ceiling: true,
|
old_kata_tree_show_wall_ceiling_onclick: true,
|
old_kata_tree_show_wall_floor_onclick: true,
|
|
old_kata_tree_show_wall_all_controls: true,
|
old_kata_tree_show_wall_AB: true,
|
old_kata_tree_show_wall_A: true,
|
old_kata_tree_show_wall_DCBA1: true,
|
old_kata_tree_show_wall_ABCD1: true,
|
old_kata_tree_show_wall_ABCD2: true,
|
old_kata_tree_show_wall_DCBA2: true,
|
old_kata_tree_show_wall_AB_L_Corner: true,
|
old_kata_tree_show_wall_AB_R_Corner: true,
|
old_kata_tree_show_wall_ABC_ANGLE_UP: true,
|
old_kata_tree_show_wall_ABC_ANGLE_DOWN: true,
|
old_kata_tree_show_wall_ABCDE: true,
|
old_kata_tree_show_wall_ABCDE_ANGLE_UP: true,
|
old_kata_tree_show_wall_BCAD: true,
|
old_kata_tree_show_wall_DCAB: true,
|
old_kata_tree_show_wall_BACD: true,
|
old_kata_tree_show_wall_DACB: true,
|
|
old_kata_tree_ausf_center_show_level_1: true,
|
old_kata_tree_ausf_center_show_preserve_local_properties: true,
|
old_kata_tree_ausf_center_preserve_local_properties: true,
|
old_kata_tree_ausf_center_show_level_2: true,
|
old_kata_tree_ausf_center_show_level_3: true,
|
|
panel_left_show: false,
|
landingPage: "",
|
|
article_type_a: true,
|
article_type_pp: true,
|
article_type_combination: false,
|
|
enable_wizard: false,
|
enable_wizard_fm: false,
|
enable_wizard_st: false,
|
enable_wall_picking: false,
|
enable_picking: true,
|
enable_wizard_generic: false,
|
|
|
pdfviewer_settings_location: "global",
|
pdfviewer_settings_full: true,
|
pdfviewer_settings_static: false,
|
pdfviewer_settings_transition: true,
|
|
camera_bottom_angle: undefined,
|
camera_top_angle: undefined,
|
camera_depth_offset: 500,
|
camera_vector_special: true,
|
FixedCameraAngle: null,
|
|
disable_rotation: false,
|
disable_placer_magnet: false,
|
disable_intersection_marker: true,
|
|
disable_wall_selection: false,
|
|
disable_properties_on_selection: false,
|
|
load_initial_article: true,
|
|
add_floor: true,
|
enable_automatic_wall: false,
|
input_enable_automatic_height: 2500,
|
input_enable_automatic_offset: 500,
|
|
|
camera_smoothing_enabled: true,
|
|
show_disabled_property_button: false,
|
|
enable_property_row: false,
|
alternative_progproperties_transfer: false,
|
disable_property_value_counter: false,
|
|
show_article_info: false,
|
show_commission_name: false,
|
show_price: false,
|
show_price_overlay: false,
|
show_price_uvp_text: true,
|
show_article_number: false,
|
show_furnray_module: true,
|
show_shipping_costs_notice: false,
|
web_ui_handles_shopping_cart: false,
|
|
disable_measure_absz: false,
|
fitting_auto_disable: false,
|
|
furnplan_disable_text_3d: false,
|
furnplan_disable_text_3d_screenshot: false,
|
furnplan_enable_redbox: false,
|
enable_redbox_text_onselection: false,
|
|
enable_app_connection_data: false,
|
enable_app_connection_data_delegated: false,
|
enable_external_property_updates: false,
|
|
furnplan_price_list: false,
|
|
enable_placing: true,
|
vplacer: false,
|
|
enable_single_selection: false,
|
enable_selection_only: false,
|
enable_selection_context_menu: false,
|
enable_advanced_context_menu: false,
|
enable_dimchange_context_menu: false,
|
enable_delete_context_menu_filter: false,
|
enable_frontstop_context_menu: false,
|
enable_depth_selection: false,
|
enable_offset_selection: false,
|
// enable_front_selection : false,
|
// enable_fitting_selection: false,
|
|
startupSettings: {
|
flyouts: {
|
toolbarFlyout: false,
|
rightPanelFlyout: false
|
}
|
},
|
|
manufacturerWhitelist: [],
|
|
accessListSettings: [],
|
|
webui_mode: false,
|
|
enable_undo: false,
|
enable_redo: false,
|
clear_scene_by_image_select: false,
|
request_leave_confirmation: true,
|
|
enable_modular_textures: false,
|
scene_render_scale_factor: 1.0,
|
|
webshopApi: {
|
url: "",
|
parameters: [],
|
shoppingCartHandler: ""
|
},
|
|
userHints: [],
|
|
toolbar_button_lines: true,
|
toolbar_button_groundMirror: true,
|
// toolbar_button_antialiasing: false,
|
toolbar_button_shadow: true,
|
toolbar_button_ssao: true,
|
toolbar_button_outdoor_lighting: true,
|
|
toolbar_button_default_lines: true,
|
toolbar_button_default_groundMirror: false,
|
// toolbar_button_default_antialiasing: false,
|
toolbar_button_default_shadow: true,
|
price_fraction_digits: 1,
|
toolbar_button_default_ssao: false,
|
default_fog_settings: true,
|
default_fog_background_settings: false,
|
default_fog_color_settings: "#FFFFFF",
|
scene_background_color: "#FFFFFF",
|
transparent_canvas_background: false,
|
remove_properties_if_exists: false,
|
|
enable_autoplace_accessoires: false,
|
enable_dim_change: false,
|
enable_only_manu_cats: false,
|
|
|
vb_ssao_renderSettings: false,
|
occlusion_vb_ssao: 0.0,
|
kernel_radius_vb_ssao: 0.0,
|
cosine_thresh_vb_ssao: 0.0,
|
attenuation_vb_ssao: 0.0,
|
blur_sigma_vb_ssao: 0.0,
|
depth_sensitivity_vb_ssao: 0.0,
|
|
enable_outdoor_lighting: false,
|
outdoor_lighting_sun_x: -0.47,
|
outdoor_lighting_sun_y: 0.63,
|
outdoor_lighting_sun_z: -1,
|
|
enable_ambient_lighting: true,
|
ambient_lighting_color: "#FFFFFF",
|
|
autolux_spotlight_color: "#FFFFFF",
|
|
forceARExport: false,
|
};
|
|
if (Config.furnview.projectManager && Config.furnview.projectManager.enable) {
|
defaultConfiguration.projectManager = Config.furnview.projectManager;
|
|
// fallback for old configuration files
|
if (!defaultConfiguration.projectManager.baseUrl) {
|
const host = defaultConfiguration.projectManager.host;
|
const port = defaultConfiguration.projectManager.port;
|
|
defaultConfiguration.projectManager.baseUrl = `http://${host}:${port}`;
|
}
|
}
|
else {
|
defaultConfiguration.projectManager = {
|
baseUrl: "",
|
enable: 0
|
};
|
}
|
|
module.exports = {
|
|
makeAutoZoomConfig: function (source_, destination_, listType_) {
|
if (source_.autoZoomConfig) {
|
if (!destination_.autozoom) {
|
destination_.autozoom = {};
|
}
|
destination_.autozoom[listType_] = { blacklist: false, categories: [] };
|
if (source_.autoZoomConfig[listType_]) {
|
destination_.autozoom[listType_].blacklist = !source_.autoZoomConfig[listType_].listType;
|
destination_.autozoom[listType_].categories = source_.autoZoomConfig[listType_].keys;
|
}
|
}
|
return destination_;
|
},
|
|
getArticleURLConfigurationDefaults: async function () {
|
const configuration = await this.newConfiguration();
|
|
this.disableAll(configuration);
|
|
configuration.old_kata_tree_show_wall_simple = true;
|
configuration.old_kata_tree_show_wall_individual = true;
|
configuration.old_kata_tree_show_wall_tex = true;
|
configuration.old_kata_tree_show_wall_window = true;
|
configuration.old_kata_tree_show_wall_door = true;
|
configuration.old_kata_tree_show_wall_free_edit = true;
|
configuration.old_kata_tree_show_wall_wall_copy = true;
|
configuration.old_kata_tree_show_wall_del_wall = true;
|
configuration.old_kata_tree_show_wall_del_all_walls = true;
|
configuration.old_kata_tree_show_wall_del_ceiling = true;
|
configuration.old_kata_tree_show_wall_ceiling_onclick = true;
|
configuration.old_kata_tree_show_wall_floor_onclick = true;
|
|
configuration.old_kata_tree_show_wall_AB = true;
|
configuration.old_kata_tree_show_wall_A = true;
|
configuration.old_kata_tree_show_wall_DCBA1 = true;
|
configuration.old_kata_tree_show_wall_ABCD1 = true;
|
configuration.old_kata_tree_show_wall_ABCD2 = true;
|
configuration.old_kata_tree_show_wall_DCBA2 = true;
|
configuration.old_kata_tree_show_wall_AB_L_Corner = true;
|
configuration.old_kata_tree_show_wall_AB_R_Corner = true;
|
configuration.old_kata_tree_show_wall_ABC_ANGLE_UP = true;
|
configuration.old_kata_tree_show_wall_ABC_ANGLE_DOWN = true;
|
configuration.old_kata_tree_show_wall_ABCDE = true;
|
configuration.old_kata_tree_show_wall_ABCDE_ANGLE_UP = true;
|
configuration.old_kata_tree_show_wall_BCAD = true;
|
configuration.old_kata_tree_show_wall_DCAB = true;
|
configuration.old_kata_tree_show_wall_BACD = true;
|
configuration.old_kata_tree_show_wall_DACB = true;
|
|
configuration.toolbar_button_default_lines = true;
|
configuration.toolbar_button_default_shadow = true;
|
configuration.toolbar_show = true;
|
configuration.add_floor = true;
|
configuration.default_fog_settings = true;
|
configuration.enable_ambient_lighting = true;
|
configuration.load_initial_article = true;
|
|
return configuration;
|
},
|
|
fixUndefinedConfigurationValues: async function (destination) {
|
const configuration = await this.newConfiguration();
|
Object.keys(configuration).map(function (sourceOption) {
|
if (destination[sourceOption] === undefined) {
|
if (typeof configuration[sourceOption] === "boolean") {
|
destination[sourceOption] = !!configuration[sourceOption];
|
}
|
else {
|
destination[sourceOption] = configuration[sourceOption];
|
}
|
}
|
});
|
return destination;
|
},
|
|
/**
|
* Creates a new default configuration and merge custom configuration definitions into
|
*
|
* @returns {{}}
|
*/
|
newConfiguration: async function () {
|
const mergedDefaultConfiguration = _.clone(defaultConfiguration);
|
const configuration = await Definition.find({ name: "custom" });
|
if (configuration && configuration[0].elements) {
|
const definitions = configuration[0].elements;
|
definitions.forEach(function (cfgDefinition, index) {
|
if (!mergedDefaultConfiguration[cfgDefinition.cfgKey]) {
|
if (cfgDefinition._doc.cfgType === "FONT" || cfgDefinition._doc.cfgType === "FILEUPLOAD") {
|
mergedDefaultConfiguration[cfgDefinition._doc.cfgKey] = JSON.parse(cfgDefinition._doc.defaultValue);
|
}
|
else {
|
mergedDefaultConfiguration[cfgDefinition._doc.cfgKey] = cfgDefinition._doc.defaultValue;
|
}
|
}
|
});
|
}
|
return mergedDefaultConfiguration;
|
},
|
|
/**
|
* Gets configuration for the consumer's homeviewer
|
*/
|
getHRConfiguration: async function () {
|
const configuration = await this.newConfiguration();
|
|
this.disableAll(configuration);
|
|
return Object.assign(configuration, {
|
"furnplan_print_zubehoer_ausweisen": "0",
|
"toolbar_buttons_foreground_color_secondary": "black",
|
"toolbar_buttons_foreground_color": "rgba(0,0,0,.6)",
|
"toolbar_buttons_not_rounded": false,
|
"toolbar_buttons_background_color": "",
|
"toolbar_buttons_background_color_highlighted": "black",
|
"toolbar_transparent": false,
|
"toolbar_hide_border": false,
|
"toolbar_background_color": "",
|
"texts_planningdocuments": "0",
|
"sidebar_register_buttons_background_color_selected": "#ff8014",
|
"sidebar_show_toggler": true,
|
"sidebar_register_buttons_foreground_color_secondary": "black",
|
"sidebar_register_buttons_foreground_color": "black",
|
"sidebar_register_buttons_spacing_vertical": 0,
|
"sidebar_register_buttons_background_color": "",
|
"sidebar_register_buttons_rounded": false,
|
"sidebar_register_transparent": false,
|
"sidebar_register_hide_border": false,
|
"sidebar_register_background_color": "",
|
"wizard_sequence_zubehoer": 4,
|
"wizard_sequence_wand": 0.5,
|
"wizard_sequence_katalog": 2,
|
"wizard_sequence_hr": 1,
|
"wizard_sequence_boden": 0.5,
|
"wizard_sequence_analysis": 0.5,
|
"wizard_sequence_ausfuehrungen": 3,
|
"furnplan_merkmale_aktiv": "",
|
"manufacturer_customer_request_email": "support@dh-software.de",
|
"manufacturer_customer_request_show": false,
|
"furnplan_REG_PrintVAT": "",
|
"furnplan_REG_PrintTotalPrice": "",
|
"furnplan_REG_PrintProperty": "",
|
"furnplan_REG_PrintProgName": "",
|
"furnplan_REG_PrintPosNumberView": "",
|
"furnplan_REG_PrintManufacName": "",
|
"furnplan_REG_PrintImagePers": "",
|
"furnplan_REG_PrintCombiSubpos": "",
|
"furnplan_REG_PrintBoundaryTopGlobalMassstab": "",
|
"furnplan_REG_PrintBoundaryTopGlobalCabDim": "",
|
"furnplan_REG_PrintBoundaryTopGlobal": "",
|
"furnplan_REG_PrintArtikelPrice": "",
|
"furnplan_REG_PrintArtikelNumberView": "",
|
"furnplan_REG_PrintArtikelNumber": "",
|
"furnplan_REG_PrintArtikelauflistung": "",
|
"furnplan_REG_PrintAnsichten": "",
|
"furnplan_REG_EdgeLineInFurnitureColor": "",
|
"furnplan_print_zubehoer_planer": "0",
|
"manufacturer_name": "D+H Software",
|
"site_buttons_foreground_color": "",
|
"site_buttons_background_color": "",
|
"texts_terms_planning": "1",
|
"texts_terms_cloudid": "0",
|
"site_background_color": "",
|
"toolbar_button_fullscreen": false,
|
"toolbar_button_animation": true,
|
"toolbar_button_front": false,
|
"toolbar_button_resetCamera": false,
|
"toolbar_button_takeScreenshot": true,
|
"toolbar_button_zoom": false,
|
"toolbar_button_finish_planning": false,
|
"toolbar_button_info": true,
|
"toolbar_button_translate": true,
|
"toolbar_button_renderSettings": true,
|
"toolbar_button_ar": true,
|
"panel_right_register_scene": false,
|
"panel_right_register_kata_tree": false,
|
"panel_right_register_properties": false,
|
"panel_right_register_floor": false,
|
"panel_right_register_wall": false,
|
"panel_right_register_interior_design": false,
|
"panel_right_register_hybrid_reality": true,
|
"panel_right_register_analysis": false,
|
"panel_right_openInitially_do": true,
|
"panel_right_show_manufacturer_selection": false,
|
"panel_right_show_program_selection": false,
|
"panel_right_show_categoryIdm_selection": false,
|
"panel_right_show_article_input": false,
|
"panel_right_show_dimensions_list": false,
|
"add_floor": true,
|
"enable_wall_picking": false,
|
"enable_picking": false,
|
"show_article_info": false,
|
"show_price": false,
|
"enable_wizard": false,
|
"article_type_a": false,
|
"article_type_pp": false,
|
"country": "",
|
"selectedManufacturer": "nolteg",
|
"wizard_sequence_speichern": 8,
|
"enable_placing": false,
|
"show_disabled_property_buttons": false,
|
"interior_property": false,
|
"panel_right_show_proggroup_selection": false,
|
"disable_right_click": false,
|
"enable_measure_box": false,
|
"enable_shoppingcart": false,
|
"enable_help": false,
|
"disable_drag_n_drop": false,
|
"toolbar_button_ar": true,
|
"toolbar_show": true,
|
"toolbar_button_logout": true,
|
"toolbar_button_furnview_app": true,
|
"toolbar_button_pickMode": true,
|
"toolbar_button_camera_reset_front": false,
|
"toolbar_button_homeviewer_finish_planning": false,
|
"toolbar_furnplan_toolbar": false,
|
"panel_right_show": true,
|
"panel_right_show_programimages_selection": false,
|
"panel_right_show_section_selection": false,
|
"panel_right_openInitially_register": "old-kata-tree-panel",
|
"webui_mode": false,
|
"panel_right_register_old_kata_tree": true,
|
"panel_right_register_old_accessories": false,
|
"panel_right_register_old_wall_selection": false,
|
"panel_right_register_old_furnray": false,
|
"panel_right_register_kata_tree_generic": false,
|
"panel_right_register_accessoires_generic": false,
|
"old_kata_tree_show_toolbar": true,
|
"old_kata_tree_toolbar_grid": false,
|
"old_kata_tree_toolbar_placer": false,
|
"old_kata_tree_toolbar_cloud": false,
|
"old_kata_tree_toolbar_new_scene": false,
|
"old_kata_tree_toolbar_project_manager": false,
|
"old_kata_tree_toolbar_redlining": false,
|
"old_kata_tree_toolbar_print": false,
|
"old_kata_tree_toolbar_mhs_print": false,
|
"old_kata_tree_toolbar_undo": false,
|
"old_kata_tree_toolbar_reload": false,
|
"old_kata_tree_toolbar_manufacturer": true,
|
"old_kata_tree_toolbar_manufacturer_editable": true,
|
"old_kata_tree_toolbar_share": false,
|
"old_kata_tree_toolbar_customer_project_manager": false,
|
"old_kata_tree_toolbar_cloud_download": false,
|
"old_kata_tree_show_program_selection": true,
|
"old_kata_tree_show_article_input_line": true,
|
"old_kata_tree_show_category_list": true,
|
"old_kata_tree_show_wall_simple": true,
|
"old_kata_tree_show_wall_individual": true,
|
"old_kata_tree_show_wall_tex": true,
|
"old_kata_tree_show_wall_window": true,
|
"old_kata_tree_show_wall_door": true,
|
"old_kata_tree_show_wall_free_edit": true,
|
"old_kata_tree_show_wall_wall_copy": true,
|
"old_kata_tree_show_wall_del_wall": true,
|
"old_kata_tree_show_wall_del_all_walls": true,
|
"old_kata_tree_show_wall_del_ceiling": true,
|
"old_kata_tree_show_wall_ceiling_onclick": true,
|
"old_kata_tree_show_wall_floor_onclick": true,
|
"old_kata_tree_show_wall_all_controls": true,
|
"old_kata_tree_show_wall_AB": true,
|
"old_kata_tree_show_wall_A": true,
|
"old_kata_tree_show_wall_DCBA1": true,
|
"old_kata_tree_show_wall_ABCD1": true,
|
"old_kata_tree_show_wall_ABCD2": true,
|
"old_kata_tree_show_wall_DCBA2": true,
|
"old_kata_tree_show_wall_AB_L_Corner": true,
|
"old_kata_tree_show_wall_AB_R_Corner": true,
|
"old_kata_tree_show_wall_ABC_ANGLE_UP": true,
|
"old_kata_tree_show_wall_ABC_ANGLE_DOWN": true,
|
"old_kata_tree_show_wall_ABCDE": true,
|
"old_kata_tree_show_wall_ABCDE_ANGLE_UP": true,
|
"old_kata_tree_show_wall_BCAD": true,
|
"old_kata_tree_show_wall_DCAB": true,
|
"old_kata_tree_show_wall_BACD": true,
|
"old_kata_tree_show_wall_DACB": true,
|
"old_kata_tree_ausf_center_show_level_1": true,
|
"old_kata_tree_ausf_center_show_preserve_local_properties": true,
|
"old_kata_tree_ausf_center_preserve_local_properties": true,
|
"old_kata_tree_ausf_center_show_level_2": true,
|
"old_kata_tree_ausf_center_show_level_3": true,
|
"panel_left_show": false,
|
"landingPage": "",
|
"article_type_combination": false,
|
"enable_wizard_fm": false,
|
"enable_wizard_st": false,
|
"enable_wizard_generic": false,
|
"pdfviewer_settings_location": "global",
|
"pdfviewer_settings_full": true,
|
"pdfviewer_settings_static": false,
|
"pdfviewer_settings_transition": true,
|
"camera_depth_offset": "500",
|
"camera_vector_special": true,
|
"FixedCameraAngle": null,
|
"disable_rotation": false,
|
"disable_placer_magnet": false,
|
"disable_intersection_marker": true,
|
"disable_wall_selection": false,
|
"disable_properties_on_selection": false,
|
"load_initial_article": false,
|
"enable_automatic_wall": false,
|
"input_enable_automatic_height": 2500,
|
"input_enable_automatic_offset": 500,
|
"camera_smoothing_enabled": true,
|
"show_disabled_property_button": false,
|
"enable_property_row": false,
|
"alternative_progproperties_transfer": false,
|
"disable_property_value_counter": false,
|
"show_commission_name": false,
|
"show_price_overlay": false,
|
"show_price_uvp_text": true,
|
"show_article_number": false,
|
"show_furnray_module": false,
|
"disable_measure_absz": false,
|
"fitting_auto_disable": false,
|
"furnplan_enable_redbox": false,
|
"enable_redbox_text_onselection": false,
|
"enable_app_connection_data": false,
|
"enable_external_property_updates": false,
|
"furnplan_price_list": false,
|
"vplacer": false,
|
"enable_single_selection": false,
|
"enable_selection_only": false,
|
"enable_selection_context_menu": false,
|
"enable_advanced_context_menu": false,
|
"enable_depth_selection": false,
|
"enable_offset_selection": false,
|
"startupSettings": {
|
"flyouts": {
|
"toolbarFlyout": false,
|
"rightPanelFlyout": false
|
}
|
},
|
"manufacturerWhitelist": [],
|
"accessListSettings": [],
|
"enable_undo": false,
|
"enable_redo": false,
|
"clear_scene_by_image_select": false,
|
"request_leave_confirmation": false,
|
"enable_modular_textures": false,
|
"webshopApi": {
|
"url": "",
|
"parameters": [],
|
"httpHeaders": [],
|
"shoppingCartHandler": "",
|
"includeAttachments": "0"
|
},
|
"userHints": [],
|
"toolbar_button_lines": true,
|
"toolbar_button_groundMirror": false,
|
"toolbar_button_antialiasing": false,
|
"toolbar_button_shadow": true,
|
"toolbar_button_ssao": true,
|
"toolbar_button_outdoor_lighting": true,
|
"toolbar_button_default_lines": false,
|
"toolbar_button_default_groundMirror": false,
|
"toolbar_button_default_antialiasing": false,
|
"toolbar_button_default_shadow": true,
|
"toolbar_button_default_ssao": false,
|
"default_fog_settings": true,
|
"default_fog_background_settings": false,
|
"default_fog_color_settings": "#1C1C1C",
|
"transparent_canvas_background": false,
|
"enable_autoplace_accessoires": false,
|
"enable_dim_change": false,
|
"enable_only_manu_cats": false,
|
"vb_ssao_renderSettings": true,
|
"occlusion_vb_ssao": "1.8",
|
"kernel_radius_vb_ssao": "0.05",
|
"cosine_thresh_vb_ssao": "0.05",
|
"attenuation_vb_ssao": "0.2",
|
"blur_sigma_vb_ssao": "100",
|
"depth_sensitivity_vb_ssao": "14",
|
"projectManager": {
|
"host": "",
|
"port": "",
|
"enable": 0
|
},
|
"fm_wizard_logo": "/images/wizardfm/logo-moebel.svg",
|
"fm_wizard_subtitle": "",
|
"fm_wizard_title": "",
|
"wizard_sequence_accessoires": 0,
|
"wizard_sequence_interior_property": 0,
|
"generic_wizard_customize_ui": false,
|
"generic_wizard_dealer_search": "",
|
"generic_wizard_linkback_url": "",
|
"generic_wizard_logo": "/images/",
|
"generic_wizard_preselected_cat": "",
|
"generic_wizard_preselected_x": "",
|
"generic_wizard_preselected_y": "",
|
"generic_wizard_preselected_z": "",
|
"generic_wizard_template": "DHACCORDION",
|
"generic_wizard_title": "",
|
"generic_wizard_transfer_cart": false,
|
"generic_wizard_base_action_bg_color": "#e84910",
|
"generic_wizard_base_action_color": "#ffffff",
|
"generic_wizard_base_bg_color": "#ffffff",
|
"generic_wizard_base_color": "#e84910",
|
"generic_wizard_base_disabled_bg_color": "#c1bfbe",
|
"generic_wizard_base_disabled_color": "#000000",
|
"generic_wizard_base_element_bg_color": "#000000",
|
"generic_wizard_base_element_color": "#ffffff",
|
"generic_wizard_base_selected_bg_color": "#e84910",
|
"generic_wizard_base_subelement_bg_color": "#ffffff",
|
"generic_wizard_base_subelement_color": "#000000",
|
"generic_wizard_steps_border_color": "#000000",
|
"generic_wizard_steps_color": "#000000",
|
"generic_wizard_steps_hover_bg_color": "#ff8014",
|
"generic_wizard_steps_hover_color": "#000000",
|
"generic_wizard_steps_selected_bg_color": "#e84910",
|
"generic_wizard_steps_selected_color": "#ffffff",
|
"generic_wizard_subelement_small": false,
|
"unit_wizard_logo": "/images/wizardspecial/logo-moebel.svg",
|
"unit_wizard_title": "Schrankplaner",
|
"webcab_target": "webcab",
|
"application_behavior_VAT_CUSTOM_RATES": "",
|
"furnplan_article_url_configurator_verband": "",
|
"furnplan_default_discount": 0,
|
"furnplan_dimscale": 0.1,
|
"furnplan_ignore_max_discount_lock": false,
|
"furnplan_REG_WallStandard": "",
|
"furnplan_REG_FloorStandard": "",
|
"furnplan_REG_ForceStandardMaterial": "0",
|
"furnplan_save_in_local_cloud": "0",
|
"furnplan_use_native_projects_path": "",
|
"furnview_developer_key": "4cfb8ed4d8988dc2c2acf7fdb4c28999601c7644",
|
"furnview_old_kata_tree_start_page": "",
|
"initialArtNo": "",
|
"logo_show": true,
|
"panel_right_show_toggle": true,
|
"resetCamera_default": false,
|
"cameraReset_front_default": false,
|
"toolbar_button_slip_scene": false,
|
"toolbar_button_selection": false,
|
"default_fog_near_settings": "",
|
"default_fog_far_settings": "",
|
"new_hr_mode": true,
|
"hr_backend_configurator": true,
|
"clear_scene_by_basic_planing": false,
|
"input_automatic_wall_offset": "",
|
"input_automatic_wall_height": "",
|
"disable_move_object": false,
|
"disable_move_z_object": true,
|
"disable_collision": false,
|
"fitting_measure": false,
|
"enable_experimental_auto_effect": false,
|
"enable_experimental_auto_high_effect": false,
|
"camera_fixed_view": false,
|
"camera_min_distance": "",
|
"camera_max_distance": "",
|
"camera_top_angle": "",
|
"camera_bottom_angle": "",
|
"camera_left_angle": "",
|
"camera_right_angle": "",
|
"print_without_door": false,
|
"selectedProgram": "0",
|
"selectedArticleNo": "",
|
"lastInitialPlanningId": "0",
|
"input_start_kata_page": "",
|
"sessionResetSettings": {
|
"enabled": false,
|
"showModalTime": "",
|
"resetTime": ""
|
},
|
"boxStyleSetting": "{\"markerBox\":{\"mb_custom\":false,\"mBox_color\":\"#4db34d\",\"mBox_opacity\":\"0.9\",\"mBox_color_hover\":\"#4db34d\",\"mBox_opacity_hover\":\"0.9\",\"boxStyle\":false,\"useOldStyle\":false,\"cylinder_enabled\":false,\"cylinder_color\":\"#ffffff\",\"cylinder_opacity\":\"1\",\"sphere_enabled\":false,\"sphere_color\":\"#ffffff\",\"sphere_opacity\":\"1\"},\"vPlacerBox\":{\"vbox_custom\":false,\"vbox_color\":\"#4db34d\",\"vbox_opacity\":\"0.9\",\"vbox_color_hover\":\"#4db34d\",\"vbox_opacity_hover\":\"0.9\"},\"ReplaceBox\":{\"rbox_custom\":false,\"rbox_color\":\"#4db34d\",\"rbox_opacity\":\"0.9\",\"rbox_color_hover\":\"#4db34d\",\"rbox_opacity_hover\":\"0.9\"},\"boundingBox\":{\"bb_custom\":false,\"bb_color\":\"#4db34d\",\"bb_opacity\":\"0.9\",\"bb_line_enabled\":false,\"bb_line_color\":\"#4db34d\",\"bb_color_hover\":\"#4db34d\",\"bb_opacity_hover\":\"0.9\",\"bb_line_color_hover\":\"#4db34d\"},\"measureBox\":{\"measureB_custom\":false,\"measureB_line_color\":\"#000000\",\"measureB_line_opacity\":1,\"measureB_text_width\":\"\",\"measureB_position_width\":\"top_front\",\"measureB_text_height\":\"\",\"measureB_position_height\":\"left_front\",\"measureB_text_depth\":\"\",\"measureB_position_depth\":\"left_top\",\"measureB_corner_color\":\"#000000\",\"measureB_corner_opacity\":0.5,\"measureB_corner_radius\":10,\"measureB_corner_type\":2}}",
|
"input_video_url_help": "",
|
"contact": "",
|
"generic_wizard_short_price": false,
|
"generic_wizard_price_seperated": true,
|
"remove_properties_if_exists": true,
|
"mod_dim_change": 1,
|
"enable_dimchange_context_menu": false,
|
"enable_delete_context_menu_filter": false,
|
"webuiProject": "dh_theme_1",
|
"toolbar_button_accessoires": false,
|
"toolbar_button_rendering": false,
|
"panel_right_none_full_height": false,
|
"cameraRotationPoint": "center",
|
"panel_right_register_custom_roompage": false,
|
"custom_roompage_enable_wall_and_floor_properties": false,
|
"custom_roompage_enable_door_selection": false,
|
"custom_roompage_enable_window_selection": false,
|
"show_shipping_costs_notice": false,
|
"web_ui_handles_shopping_cart": false,
|
"enable_frontstop_context_menu": false,
|
"scene_render_scale_factor": "1",
|
"price_fraction_digits": "1",
|
"mod_dim_change_move_other": false,
|
"fv_theme_base_bg_color": "#FF8014",
|
"fv_theme_base_hover_color": "#FF8014",
|
"disable_mobile_restriction": false,
|
"webui_category_filter": "",
|
"webui_category_buttons_filter": "",
|
"panel_right_register_share": false,
|
"input_floor_transparency": "",
|
"free_drag_n_drop": false,
|
"disable_ui_controls": false,
|
"snap_to_nearest_element_on_move": false,
|
"snap_to_nearest_element_distance": "",
|
"disable_redbox_info_modal": false,
|
"enable_environment_lighting": false,
|
"disable_polygon_offset": false,
|
"enable_experimental_dim_edit_selectable": false,
|
"enable_wall_fitting_move": false,
|
"icon_primary_color": "#000000",
|
"deactivate_splashscreen": false,
|
"camera_vector_reset": false,
|
"camera_control_force_deactivate": false,
|
"camera_deactivate_pan": false,
|
"camera_deactivate_rotate2": false,
|
"camera_deactivate_rotate": false,
|
"webui_theme_mode": true,
|
"webui_theme_config": "{}",
|
"dragdrop_canceldirection": "2",
|
"vPlacerGroup": "",
|
"selectedBuyingGroup": "",
|
"scene_background_color": "#ffffff",
|
"use_placer_groups_from_planfile": false,
|
"furnplan_print_configuration_name": ""
|
});
|
},
|
|
|
/**
|
* Gets configuration for the consumer's homeviewer
|
*/
|
getHomeviewerConfiguration: async function () {
|
const configuration = await this.newConfiguration();
|
|
this.disableAll(configuration);
|
|
configuration.toolbar_show = true;
|
configuration.toolbar_button_info = true;
|
configuration.toolbar_button_animation = true;
|
configuration.toolbar_button_fullscreen = true;
|
configuration.toolbar_button_resetCamera = true;
|
configuration.toolbar_button_camera_reset_front = true;
|
configuration.toolbar_button_default_lines = true;
|
|
configuration.cameraReset_front_default = false;
|
configuration.resetCamera_default = true;
|
|
configuration.toolbar_button_zoom = true;
|
configuration.toolbar_button_front = true;
|
configuration.toolbar_button_accessoires = true;
|
configuration.toolbar_button_rendering = true;
|
configuration.toolbar_button_translate = true;
|
configuration.toolbar_button_renderSettings = true;
|
configuration.toolbar_button_finish_planning = false;
|
configuration.toolbar_button_deliver_app_data = false;
|
configuration.toolbar_button_article_group = false;
|
configuration.toolbar_button_maximum_discount = false;
|
configuration.toolbar_button_homeviewer_finish_planning = true;
|
configuration.panel_right_show = true;
|
configuration.panel_right_register_properties = true;
|
configuration.panel_right_register_floor = true;
|
configuration.panel_right_register_wall = true;
|
configuration.panel_right_show_article_input = true;
|
configuration.add_floor = true;
|
configuration.default_fog_settings = true;
|
configuration.camera_vector_special = false;
|
configuration.is_homeviewer = true;
|
configuration.enable_ambient_lighting = true;
|
|
return configuration;
|
},
|
|
getARExportConfiguration: async function() {
|
const configuration = await this.getHomeviewerConfiguration();
|
|
configuration.toolbar_show = false;
|
configuration.panel_right_show = false;
|
|
return configuration;
|
},
|
|
hideAllControls: function (configuration) {
|
configuration.toolbar_show = false;
|
configuration.panel_right_show = false;
|
},
|
|
setKioskMode: function (configuration) {
|
this.hideAllControls(configuration);
|
|
configuration.panel_right_openInitially_do = false;
|
|
configuration.panel_right_register_scene = false;
|
configuration.panel_right_register_old_kata_tree = false;
|
configuration.panel_right_register_kata_tree = false;
|
configuration.panel_right_register_kata_tree_generic = false;
|
configuration.default_fog_settings = true;
|
configuration.webui_mode = true;
|
},
|
|
/**
|
* Reads options from the source configuration and sets them on the destination configuration
|
*
|
* @param {{}} destination
|
* @param {{}} source
|
*/
|
merge: function (destination, source) {
|
const configuration = source.configuration || source;
|
Object.keys(configuration).map(function (sourceOption) {
|
if (typeof destination[sourceOption] === "boolean") {
|
destination[sourceOption] = !!configuration[sourceOption];
|
}
|
else if (sourceOption != "projectManager") {
|
destination[sourceOption] = configuration[sourceOption];
|
}
|
});
|
|
if (source && source.configuration && source.accessListSettings) {
|
destination.accessListSettings = {};
|
source.accessListSettings.forEach(function (accessListSetting) {
|
const accessListSettingObj = accessListSetting.toObject();
|
destination.accessListSettings[accessListSettingObj.type] = {
|
keys: accessListSettingObj.keys,
|
type: accessListSettingObj.listType,
|
orders: accessListSettingObj.orders,
|
custom_pdf: accessListSettingObj.custom_pdf,
|
custom_global_pdf: accessListSettingObj.custom_global_pdf
|
};
|
});
|
}
|
|
if (source && source.configuration && source.propertyOrderLists && source.propertyOrderLists.length && source.propertyOrderLists[0].keys) {
|
destination.propertyOrderLists = source.propertyOrderLists[0].keys;
|
}
|
|
if (source && source.configuration && source.defaultArticleList && source.defaultArticleList.keys.length > 0) {
|
destination.defaultArticleList = source.defaultArticleList;
|
}
|
|
if (!destination.FixedCameraAngle && (destination.camera_bottom_angle || destination.camera_top_angle
|
|| destination.camera_left_angle || destination.camera_right_angle)) {
|
destination.FixedCameraAngle = {
|
bottom: +destination.camera_bottom_angle,
|
top: +destination.camera_top_angle,
|
left: +destination.camera_left_angle,
|
right: +destination.camera_right_angle
|
};
|
destination.camera_bottom_angle = undefined;
|
destination.camera_top_angle = undefined;
|
}
|
|
////////////////https://joope.de/issues/46324 Kamera Zoom Tisch Stuhl FS / JM
|
ConfigurationManager.makeAutoZoomConfig(source, destination, "ignoreBox");
|
ConfigurationManager.makeAutoZoomConfig(source, destination, "ignoreAngle");
|
////////////////
|
|
// show toolbar only if at least one button is visible
|
destination.toolbar_show = Object.keys(destination).some(function (destinationOption) {
|
return destinationOption.indexOf("toolbar_button") > -1 && destinationOption.indexOf("toolbar_button_default") === -1 ? destination[destinationOption] === true : false;
|
});
|
|
// show right panel only if at least one register is visible
|
destination.panel_right_show = Object.keys(destination).some(function (destinationOption) {
|
return destinationOption.indexOf("panel_right_register") > -1 ? destination[destinationOption] === true : false;
|
});
|
|
destination.camera_smoothing_enabled = true;
|
destination.modularLayoutRootConfigurations = source.modularLayoutRootConfigurations ? source.modularLayoutRootConfigurations.layout : undefined;
|
destination.modularLayoutLayoutConfigurations = source.modularLayoutLayoutConfigurations ? source.modularLayoutLayoutConfigurations.layout : undefined;
|
destination.modularLayout = source.modularLayout ? source.modularLayout.layout : undefined;
|
destination.modularStylings = source.modularStylings ? source.modularStylings.map((styling) => {
|
return styling.style;
|
}) : undefined;
|
return destination;
|
},
|
|
disableAll: function (configuration) {
|
Object.keys(configuration).map(function (option) {
|
if (typeof configuration[option] === "boolean") configuration[option] = false;
|
});
|
},
|
|
/**
|
* Get a default configuration from database
|
*
|
* @returns {Promise<void>}
|
*/
|
getLocalDefaultConfiguration: async function () {
|
try {
|
let defaultConfiguration = await UseCaseConfiguration.findOne({
|
customerNo: { $ne: "default" },
|
externalConf: true
|
});
|
|
if (!defaultConfiguration) {
|
defaultConfiguration = await UseCaseConfiguration.findOne({
|
customerNo: "default",
|
externalConf: true
|
});
|
}
|
defaultConfiguration.configuration.default_fog_settings = true;
|
defaultConfiguration.configuration.camera_vector_special = false;
|
|
return defaultConfiguration;
|
}
|
catch (e) {
|
console.log("Unable to retrieve default configuration from database. Falling back to hard coded configuration");
|
|
return this.newConfiguration();
|
}
|
}
|
};
|