You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
30 KiB
1 line
30 KiB
5 years ago
|
webpackJsonp([1],{355:function(t,e,o){(function(e){"use strict";function i(t,e){this.options=t||{},this._chartWidget=t.chartWidget,this._model=e}function s(t,e){e.__init||(t.initView(),e.__init=!0)}var r,n=o(356),a=o(533),l=o(82).LineDataSource,d=o(348).createTabbedDialog,c=o(35).trackEvent;o(535),r=null,i.prototype.getSourceProperties=function(){var t,e,o,i,s,r,n,a={groups:[],drawings:[],currentSymbol:this._model.mainSeries().symbol()};for(t=0;t<this._model.panes().length;t++){for(e=this._model.panes()[t],o=[],i=e.orderedSources(),s=0;s<i.length;s++)r=i[s],r.showInObjectTree()&&o.push({datasource:r,name:r.title()});for(n=e.dataSources(),s=0;s<n.length;s++)(r=n[s])instanceof l&&r.showInObjectTree()&&a.drawings.push({datasource:r,name:r.title(),symbol:r.symbol()});o.length&&a.groups.push({children:o})}return a},i.prototype.show=function(){var t,o,i,l,h,u,p,_,v,m;c("GUI","Objects Tree"),t=[],o=$(),i=$("<div>"),l=this.getSourceProperties.bind(this),h=$("<div>"),u=new n(l,this._chartWidget,this._model,h,i),o=o.add(i),t.push({customControl:i,name:$.t("Objects Tree"),page:h,onActivate:s.bind(null,u)}),p=null,e.enabled("support_manage_drawings")&&(_=$("<div>"),v=$("<div>"),p=new a(l,this._chartWidget,this._model,v,_),o=o.add(_),t.push({customControl:_,name:$.t("Manage Drawings"),page:v,onActivate:s.bind(null,p)})),m=d({tabs:t,width:520,tabStateSaveKey:"ObjectsTreeDialog.tab",activeTab:this.options.activeTab,customControlsContainerAddClass:"tv-objects-tree-dialog__custom-controls-container",customControls:o,destroyOnClose:!0,height:480,withScroll:!1,contentAddClass:"js-dialog__scroll-wrap",isClickOutFn:function(t){if($(t.target).parents().andSelf().is("._tv-dialog, .properties-toolbar, .colorpicker, .tvcolorpicker-popup, .symbol-edit-popup, .context-menu"))return!1}}),m.tabs.tabChanged.subscribe(null,function(e){t[e].onActivate(t[e]);for(var o=0;o<t.length;++o)t[o].customControl.toggleClass("i-hidden",e!==o);m.tabs.checkScrollArrows(!0)}),t[m.tabs.index()].onActivate(t[m.tabs.index()]),m.dialog.on("beforeClose",function(){u.destroy(),p&&p.destroy(),r=null}),r&&r.close(),r=m.dialog,m.dialog.open()},t.exports.ObjectTreeDialog=i}).call(e,o(1))},356:function(t,e,o){"use strict";function i(t,e,o,i,s){r.call(this,t,e,o,i),this._delayedRenderIntervals={},this._$filterContainer=s,this._boundUpdateView=this._updateView.bind(this),this._boundRenderView=this._renderView.bind(this,null),this._zorderChangedHandler=this._onZorderChanged.bind(this)}var s=o(357).ObjectsTreeTabFilter,r=o(363);o(532),inherit(i,r),i.prototype.destroy=function(){Object.keys(this._delayedRenderIntervals).forEach(function(t){clearInterval(t)}),this._delayedRenderIntervals=null,r.prototype.destroy.call(this)},i.prototype.initView=function(){this._filter=new s(this._$filterContainer),this._filter.onChange.subscribe(this,function(){this._renderView(this._scroll.scrollToStart.bind(this._scroll))}.bind(this)),r.prototype.initView.call(this)},i.prototype._addSortableToList=function(t,e){var o=0;this._listAccessor().createSortableForItemsList(t,function(t,e){o=e.item.index()},function(t,i){var s,r,n,a,l,d,c,h,u,p=i.item.index();if(o!==p){for(s=o>p?i.item.next():i.item.prev(),r=this._getSourceIdForItem(i.item),n=this._getSourceIdForItem(s),a=-1,l=-1,d=0;d<e.length;++d)c=e[d],c.datasource.id()===r?a=d:c.datasource.id()===n&&(l=d);for(h=this._chartModel.dataSourceForId(r),this._chartModel.removeListener("changeZOrder",this._zorderChangedHandler),this._chartModel.beginUndoMacro("Change "+h.title()+" Z order"),u=a>l?1:-1,d=0;d<Math.abs(a-l);d++)this._chartModel.changeZOrder(h,u);this._chartModel.endUndoMacro(),this._chartModel.on("changeZOrder",this._zorderChangedHandler)}}.bind(this))},i.prototype._getNewSelectedIdOnRemoval=function(t){var e=t.next();0===e.length&&(e=t.prev()),this._listAccessor().activateItem(e,this._getSourceForItem(e))},i.prototype._moveItemUp=function(t){var e=t.prev();e.length&&(t.insertBefore(e),this._scroll.scrollTo(t))},i.prototype._moveItemDown=function(t){var e=t.next();e.length&&(t.insertAfter(e),this._scroll.scrollTo(t))},i.prototype._removeSourceF
|