Files
ai/charting_library/bundles/line-tool-balloon.0b75f8af9f6cbae4274d.js

1 line
1.6 KiB
JavaScript

"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1277],{11924:(e,t,r)=>{r.r(t),r.d(t,{LineToolBalloon:()=>p});var o=r(50151),l=r(11542),s=r(32679),i=r(10568),n=r(12988),a=r(73305);const d=l.t(null,void 0,r(9818));class p extends i.InplaceTextLineDataSource{constructor(e,t,r,o){super(e,t??p.createProperties(e.backgroundTheme().spawnOwnership()),r,o),this._createPaneView()}pointsCount(){return 1}name(){return"Balloon"}template(){const e=super.template();return e.text=this.properties().childs().text.value(),e}shouldBeRemovedOnDeselect(){return""===this._properties.childs().text.value().trim()}editableTextProperties(){(0,o.assert)(!1,"unexpected method call")}static createProperties(e,t){const r=new s.DefaultProperty({defaultName:"linetoolballoon",state:t,theme:e});return this._configureProperties(r),r}_applyTemplateImpl(e){super._applyTemplateImpl(e),this.properties().childs().text.setValue(e.text)}_getPropertyDefinitionsViewModelClass(){return Promise.all([r.e(3401),r.e(3889),r.e(8009),r.e(6204),r.e(1963),r.e(8537)]).then(r.bind(r,18046)).then((e=>e.BalloonDefinitionsViewModel))}_createPaneView(){Promise.all([r.e(2870),r.e(2211),r.e(1583)]).then(r.bind(r,82462)).then((e=>{this._setPaneViews([new e.BalloonPaneView(this,this._model)])}))}static _configureProperties(e){super._configureProperties(e),e.hasChild("text")||e.addChild("text",new n.Property(this._defaultText)),e.addExcludedKey("text",1),e.addChild("linesColors",new a.LineToolColorsProperty([e.childs().borderColor])),e.addChild("textsColors",new a.LineToolColorsProperty([e.childs().color]))}}p._defaultText=d}}]);