Allow applications to specify a different SVG filename
HTML Drawing Control
Allow applications to specify a different SVG filename
HTML drawing control allows applications to specify any kind of Scalable Vector Graphics (SVG) filename to load. The name does not have to be afm_dwgs.dwg_name .
HTML drawing control had two options to load a corresponding SVG drawing:
- Applications specify site_id, or bl_id and fl_id. Then the core fetches corresponding dwg_name from afm_dwgs table and load dwg_name defined SVG file.
- Applications specify dwg_name, which must match its corresponding afm_dwgs.dwg_name database value. Then the core would use provided dwg_name to load corresponding SVG fie.
Move scenarios for room trial cases often require a third option: allow applications to specify a different SVG file name from afm_dwgs.dwg_name, such as hq18-room-trial1.svg.
JavaScript parameters
Specify
pkeyValues.filename
parameter for arbitrary SVG file to load and display in HTML drawing control.
var parameters = new Ab.view.ConfigObject(); parameters['pkeyValues'] = {filename: 'hq18-room-trial1.svg'}; //To do highlighting and labeling, pass corresponding restriction var restriction = new Ab.view.Restriction(); restriction.addClause('rm.bl_id', 'HQ', '='); restriction.addClause('rm.fl_id', '18', '='); parameters['highlightParameters'] = {hs_rest: restriction, ...}; this.svgControl.load(parameters);