The userSettings property provides values for user settings.
To set this property, use the ESDWeb object's set method as illustrated below, or pass it to the startup method as part of the configuration parameter.
The value of this property must be a JavaScript object containing a hash of configuration settings. These settings are supported:
laneWidth — This value will be applied to streets drawn using the Street tool on the toolbar and streets placed on the diagram using the street shapes in the Symbol Manager. The value should include the lane width and a unit designation. Examples: '10 ft', '3.5 m'.
shoulderWidth — This value will be applied when a shoulder is added to a street. The value should include the shoulder width and a unit designation. Examples: '4 ft', '1.5 m', '120 cm'.
curbReturnSetback_paved — When placing a new curb return connecting two paved streets, the curb return uses this value to determine the distance from the curbline intersection point and the point where the curb return transitions to the street border stripe. If the streets meet at a right angle, this value is the curb return's radius. Examples: '5 ft', '1.5 m', '120 cm'.
curbReturnSetback_gravel — When placing a new curb return connecting two gravel roads, the curb return uses this value to determine the distance from the road border intersection point and the point where the curb return transitions to the road's border stripe. Examples: '5 ft', '1.5 m', '120 cm'.
curbReturnSetback_dirt — This setting is used when placing a new curb return joining two dirt roads. The value describes the distance from the road border intersection point and the point where the curb returns transitions to the road's border stripe. Examples: '5 ft', '1.5 m', '120 cm'.
interiorStripeSetback — This value describes the distance from a street intersection area to the point where street interior stripes begin. Examples: '4 ft', '1.5 m', '120 cm'.
stripeDashLength — The length of the dash segments in stripes with dashed patterns. Examples: '8 ft', '3.0 m', '250 cm'.
stripeGapLength — The distance between dash segments of stripes with dashed patterns. Examples: '4 ft', '1.5 m', '120 cm'.
stripeWidth — The default line width for stripes. This value is applied when drawing new street shapes and when drawing free stripes. Examples: '6 in', '15 cm'.
strokeWidth — This is the default stroke or line width for new shapes.
The value is applied when drawing basic geometric shapes
such as lines, arcs and rectangles. Include a unit
designation in the value. Examples: '4 in', '10 cm'.
Note: Changes to stroke width are only applied to
diagrams loaded or created after the stroke width has
been
changed.
uom — This specifies the diagram editor's unit of measure. Use one of these values:
dirOfTravel — This value will be applied to streets drawn using the Street tool on the toolbar and streets placed on the diagram using the street shapes in the Symbol Manager. It sets direction of travel defaults for right and left side driving.
showCurbReturnApex — This setting determines whether or not curbline apex markers are displayed in the editor. The apex marker is placed at the location where curb lines would intersect if a curb return was not installed and the curblines of intersecting streets continued to the point where they intersect.
dimInactiveLayer — This setting determines whether or not symbols on an inactive layer will be dimmed/greyed out when navigating to a new layer. Accepts a boolean value where the default 'true' enables the dimming feature.
outlineOnly — This setting determines whether or not symbols dropped from the symbols layer will appear as outline only/white fill. Accepts a boolean value where the default 'false' suppresses this feature.
excludedSymbolCollections — This setting defines the symbol collections to be excluded. When a symbol collection is excluded its associated symbols and folders will not be shown in the symbol manager. The value of this setting will be an array of strings containing the names of the symbol collections you want to exclude. Please refer to the example below.
includeAttachments — This setting determines whether or not attachment symbols will be included by default in stored SVG, printed, and image output. Accepts a boolean value where the default is false. See the store method.
includeFieldMeasurements — This setting determines whether or not measurement layer shapes will be included by default in stored SVG, printed, and image output. Accepts a boolean value where the default is false. See the store method.
includeStructureDimensions — This setting determines whether or not wall length dimension lines will be included by default in stored SVG, printed, and image output. Accepts a boolean value where the default is false. See the store method.
exportOptions — This setting controls how images are exported. Accepts a javascript object with the following properties:
Note: Output resolution is important for two reasons. First, it used to convert output sizes (width, height, margin) expressed as linear measurements to pixels. Second, some diagram features are sized based on output resolution. Items on the measurement layer and structure dimension lines are examples of this behavior. The sizes of these items are defined in points (1/72") and the output resolution is used to calculate their output size in pixels.
editor = new ESDWeb(null, 'editorNode'); // Configure editor settings: editor.set('userSettings', { laneWidth: '10 ft', shoulderWidth: '4 ft', strokeWidth: '4 in', dirOfTravel: 'normal', uom: 'feetAndInches' dimInactiveLayer: true, outlineOnly: false, excludedSymbolCollections: [ 'VehicleAdvanced', 'RoadwayAdvanced' ], exportOptions: { width: 1000, height: 1000, margin: 20, format: "image/jpeg", imageQuality: 1, resolutionPixels: 72, resolutionUnit: 'inch' } } );