import { SceneNode , ScaleCreator } from '@chart-parts/interfaces' ; import { AxisSpec } from './AxisSpec' ; import { MarkSpec } from './MarkSpec' ; category export class SceneNodeSpec implements SceneNode { private _scales : ScaleCreator [ ] = [ ] ; private _marks : MarkSpec [ ] = [ ] ; private _axes : AxisSpec [ ] = [ ] ; public get scales ( ) { return this . _scales ; } public get marks ( ) { return this . _marks ; } public get axes ( ) { return this . _axes ; } public addScale ( value ) { this . _scales . push ( value ) ; } public removeScale ( value ) { this . _scales = this . _scales . filter ( v => v !== value ) ; } public addMark ( value ) { this . _marks . push ( value ) ; } public removeMark ( value ) { this . _marks = this . _marks . filter ( m => m !== value ) ; } public addAxis ( value ) { this . _axes . push ( value ) ; } public removeAxis ( value ) { this . _axes = this . _axes . filter ( m => m !== value ) ; } }