import powerbi from 'powerbi-visuals-api' ; import VisualObjectInstanceEnumerationObject = powerbi . VisualObjectInstanceEnumerationObject ; import SettingsBase from './SettingsBase' ; import { getConfig } from '../core/utils/config' ; import { TEditorPosition } from '../core/ui' ; /**
 * Manages editor preferences for the visual.
 */ const defaults = getConfig ( ) . propertyDefaults . editor ; export default class EditorSettings extends SettingsBase { public position : TEditorPosition = < TEditorPosition > defaults . position ; public fontSize : number = defaults . fontSize ; public wordWrap : boolean = defaults . wordWrap ; public showGutter : boolean = defaults . showGutter ; public showLineNumbers : boolean = defaults . showLineNumbers ; public showViewportMarker : boolean = defaults . showViewportMarker ; param enumerationObject param options public processEnumerationObject ( enumerationObject , options = { } ) { enumerationObject . instances . map ( ( i ) => { if ( ! this . showGutter ) { delete i . properties [ 'showLineNumbers' ] ; } } ) ; return enumerationObject ; } }