setVisibleRange additional argument - right margin % #4512 Indicators are slided when zooming chart #4456 save_load_adapter after removing chart #4454 Overriding timezone definitions #4449 Error while applying study template #4407 Wrong range of overlay after switching timeframe #4372 Intraday Data is Requesting from the server since 1970 #4366 Display price in thousands, millions, billions #4360 setBodyFont of position line tool doesn't work correctly #4353 Realtime updates shifts indicator's data for realtime bars count back #4283 Adaptive indicators dialogs #4247 Click instead of mouseDown for positionLine onClose. #4245 Add applyRightMargin flag to setVisibleRange #4233 Open volume on new pane if volume_force_overlay is enabled #4198 Keep the first visible point when a new bar comes #4188 getVisibleRange should return 00:00 for DWM #4187 21 more indicators #4170 Main series API #4169 Can not set Text property of the Note Shape #4144 Unable to hide legend #4126 setVisibleRange or getVisibleRange adds one more bar to the left #4110 Cannot set tooltip for order line #4079 Dialog is closed immediately if it is invoked from mouse_down event #4077 setVisibleRange doesn't work for multiple charts at once #4068 how to disable mp3 files being loaded? #4052 Increase spacing between bars to display short time periods #4043 Event Marker Placement always uses high #4042 Number cannot be passed as symbol into widget constructor #4039 custom_css_url not working in unstable branch #4017 ConfirmDialog does not close after YES is clicked #3981 Side DOM chart does not render in certain conditions #3975 `getAllShapes` does not return drawings loaded from state #3966 Text inside order/position lines is too small #3962 Removing the last saved chart #3954 get current chart timezone #3943 Text shape throws error setValue #3930 Wrong Symbol and Price values in context menu for secondary instrument. #3926 text override in Horizontal Line does not work #3918 Sticky magnet mode #3902 Add thin bars #3900 Event that study has been removed from the chart #3899 High-Low bars #3898 Multiple Y-axis #3897 Issue with Renko with volume and vwap indicators #3893 Layout rename doesn't send request to server #3878 Cannot create copy of copy of a chart layout #3872 Chart scrolls when tap on a trend line Safari/iphone7 #3871 Chart border overlap scale values #3826 IDatafeedChartApi.subscribeDepth parameters #3821 Error in console when restore defaults #3755 Timeframe is not precise #3722 Wrong year Ticker displayed on X axis if resolution < 2H #3678 New chart layouts #3629 Drawings disappear at certain resolutions #3594 Remove jQuery from loading custom indicator #3563 Align symbol labels #3513 createOrderLine().onMove broken in 1.13 #3480 When changing theme on the fly - chart type changing too #3459 Pivot Points Standard - path to some style params #3441 createMultipointShape overrides with dot don't work #3419 Add inverting price scale #3376 Transparent chart background color #3288 Previous timescale tooltips stay when switching currency #3165 disableSelection still shown the selections on hover #2864 Override symbol from saved_data #2493 Forecast balloon too short #2289 Context menu submenus cover up other options #2007 Add setVisiblePriceRange method #1408 Modify panes height/order #1232 Add custom Interval #1191
5 lines
14 KiB
JavaScript
5 lines
14 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{"75D8":function(t,e,n){"use strict";function o(t){return{x:t.pageX,y:t.pageY}}function r(t){return{x:t.touches[0].pageX,y:t.touches[0].pageY}}function s(t,e,n,o){var r=function(t,e,n,o){return 180*(Math.atan2(o-e,n-t)+Math.PI/2)/Math.PI}(t,e,n,o);return r<0?360+r:r}function i(t,e,n){var o,r,s;for(void 0===n&&(n=1),o=Math.max(Math.ceil((e-t)/n),0),r=Array(o),s=0;s<o;s++)r[s]=t,t+=n;return r}function a(t){return("0"+t).slice(-2)}var c,p,u,h,l=n("mrSG"),d=n("q1tI"),m=n("Eyy1"),f=n("Oehf"),_=n("TSYQ"),v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._renderNumber=function(t,n){var o,r=_(f.number,((o={})[f.active]=t===e.props.activeNumber,o[f.inner]=e.props.isInner,o)),s=e.props.format?e.props.format(t):t.toString();return d.createElement("span",{key:t,className:r,style:e._numberStyle(e.props.radius-e.props.spacing,n),"data-value":s},d.createElement("span",null,s))},e}return l.__extends(e,t),e.prototype.render=function(){return d.createElement("div",{className:f.face,style:this._faceStyle(),onMouseDown:this.props.onMouseDown,onTouchStart:this.props.onTouchStart},this.props.numbers.map(this._renderNumber))},e.prototype._faceStyle=function(){return{height:2*this.props.radius,width:2*this.props.radius}},e.prototype._numberStyle=function(t,e){var n=Math.PI/180*360/12*e;return{left:t+t*Math.sin(n)+this.props.spacing,top:t-t*Math.cos(n)+this.props.spacing}},e}(d.PureComponent),g=function(t){function e(e){var n=t.call(this,e)||this;return n._onMouseMove=function(t){n._move(o(t))},n._onTouchMove=function(t){n._move(r(t))},n._onMouseUp=function(){document.removeEventListener("mousemove",n._onMouseMove),document.removeEventListener("mouseup",n._onMouseUp),n._endMove()},n._onTouchEnd=function(t){document.removeEventListener("touchmove",n._onTouchMove),document.removeEventListener("touchend",n._onTouchEnd),n._endMove(t)},n}return l.__extends(e,t),e.prototype.componentWillUnmount=function(){document.removeEventListener("mousemove",this._onMouseMove),document.removeEventListener("mouseup",this._onMouseUp),document.removeEventListener("touchmove",this._onTouchMove),document.removeEventListener("touchend",this._onTouchEnd)},e.prototype.render=function(){var t={height:this.props.length,transform:"rotate("+this.props.angle+"deg)"};return d.createElement("div",{className:f.hand,style:t},d.createElement("span",{className:f.knob}))},e.prototype.mouseStart=function(t){document.addEventListener("mousemove",this._onMouseMove),document.addEventListener("mouseup",this._onMouseUp),this._move(o(t.nativeEvent))},e.prototype.touchStart=function(t){document.addEventListener("touchmove",this._onTouchMove),document.addEventListener("touchend",this._onTouchEnd),this._move(r(t.nativeEvent)),t.stopPropagation()},e.prototype._endMove=function(t){this.props.onMoveEnd&&this.props.onMoveEnd(t)},e.prototype._move=function(t){var e=this._trimAngleToValue(this._positionToAngle(t)),n=this._getPositionRadius(t)
|
|
;!this.props.onMove||isNaN(e)||isNaN(n)||this.props.onMove(360===e?0:e,n)},e.prototype._trimAngleToValue=function(t){return this.props.step*Math.round(t/this.props.step)},e.prototype._positionToAngle=function(t){return s(this.props.center.x,this.props.center.y,t.x,t.y)},e.prototype._getPositionRadius=function(t){var e=this.props.center.x-t.x,n=this.props.center.y-t.y;return Math.sqrt(e*e+n*n)},e}(d.PureComponent),y=[0].concat(i(13,24)),b=[12].concat(i(1,12)),M=30,w=.46,E=function(t){function e(e){var n=t.call(this,e)||this;return n._onMouseDown=function(t){n._hand.mouseStart(t)},n._onTouchStart=function(t){n._hand.touchStart(t)},n._onHandMove=function(t,e){var o=e<n.props.radius-n.props.spacing;n.state.isInner!==o?n.setState({isInner:o},function(){n.props.onChange(n._valueFromDegrees(t))}):n.props.onChange(n._valueFromDegrees(t))},n._onHandMoveEnd=function(){n.props.onSelect&&n.props.onSelect()},n.state={isInner:n.props.selected>0&&n.props.selected<=12},n}return l.__extends(e,t),e.prototype.render=function(){var t=this,e=this.props,n=e.center,o=e.radius,r=e.spacing,s=e.selected;return d.createElement("div",null,d.createElement(v,{radius:o,spacing:r,numbers:y,activeNumber:s,format:a,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),this._renderInnerFace(o*w),d.createElement(g,{ref:function(e){return t._hand=e},length:o-(this.state.isInner?o*w:r)-this.props.numberRadius,angle:s*M,step:M,center:n,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},e.prototype._renderInnerFace=function(t){return d.createElement(v,{radius:this.props.radius,spacing:t,numbers:b,activeNumber:this.props.selected,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart,isInner:!0})},e.prototype._valueFromDegrees=function(t){return this.state.isInner?b[t/M]:y[t/M]},e}(d.PureComponent),S=i(0,60,5),T=6,C=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._onMouseDown=function(t){e._hand.mouseStart(t)},e._onTouchStart=function(t){e._hand.touchStart(t)},e._onHandMove=function(t){e.props.onChange(t/T)},e._onHandMoveEnd=function(t){e.props.onSelect&&e.props.onSelect(t)},e}return l.__extends(e,t),e.prototype.render=function(){var t=this;return d.createElement("div",null,d.createElement(v,{radius:this.props.radius,spacing:this.props.spacing,numbers:S,activeNumber:this.props.selected,format:a,onMouseDown:this._onMouseDown,onTouchStart:this._onTouchStart}),d.createElement(g,{ref:function(e){return t._hand=e},length:this.props.radius-this.props.spacing-this.props.numberRadius,angle:this.props.selected*T,step:T,center:this.props.center,onMove:this._onHandMove,onMoveEnd:this._onHandMoveEnd}))},e}(d.PureComponent);n.d(e,"a",function(){return h}),c=.18,p=13,function(t){t[t.Hours=0]="Hours",t[t.Minutes=1]="Minutes"}(u||(u={})),h=function(t){function e(e){var n=t.call(this,e)||this;return n._clockFace=null,n._raf=null,n._recalculateTimeout=null,n._calculateShapeBinded=n._calculateShape.bind(n),n._onChangeHours=function(t){n.state.time.hours()!==t&&n._onChange(n.state.time.clone().hours(t))},
|
|
n._onChangeMinutes=function(t){n.state.time.minutes()!==t&&n._onChange(n.state.time.clone().minutes(t))},n._onSelectHours=function(){n._displayMinutes()},n._onSelectMinutes=function(t){t&&t.target instanceof Node&&n._clockFace&&n._clockFace.contains(t.target)&&t.preventDefault(),n.props.onSelect&&n.props.onSelect(n.state.time.clone())},n._displayHours=function(){n.setState({faceType:u.Hours})},n._displayMinutes=function(){n.setState({faceType:u.Minutes})},n._setClockFace=function(t){n._clockFace=t},n.state={center:{x:0,y:0},radius:0,time:n.props.selectedTime,faceType:u.Hours},n}return l.__extends(e,t),e.prototype.render=function(){var t,e;return d.createElement("div",{className:_(f.clock,this.props.className)},d.createElement("div",{className:f.header},d.createElement("span",{className:_(f.number,(t={},t[f.active]=this.state.faceType===u.Hours,t)),onClick:this._displayHours},this.state.time.format("HH")),d.createElement("span",null,":"),d.createElement("span",{className:_(f.number,(e={},e[f.active]=this.state.faceType===u.Minutes,e)),onClick:this._displayMinutes},this.state.time.format("mm"))),d.createElement("div",{className:f.body},d.createElement("div",{className:f.clockFace,ref:this._setClockFace},this.state.faceType===u.Hours?this._renderHours():null,this.state.faceType===u.Minutes?this._renderMinutes():null,d.createElement("span",{className:f.centerDot}))))},e.prototype.componentDidMount=function(){this._calculateShape(),this._recalculateTimeout=setTimeout(this._calculateShapeBinded,1),window.addEventListener("resize",this._calculateShapeBinded),window.addEventListener("scroll",this._calculateShapeBinded,!0)},e.prototype.componentWillUnmount=function(){this._clearTimeout(),window.removeEventListener("resize",this._calculateShapeBinded),window.removeEventListener("scroll",this._calculateShapeBinded,!0),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null)},e.prototype._clearTimeout=function(){null!==this._recalculateTimeout&&(clearTimeout(this._recalculateTimeout),this._recalculateTimeout=null)},e.prototype._renderHours=function(){return d.createElement(E,{center:this.state.center,radius:this.state.radius,spacing:this.state.radius*c,selected:this.state.time.hours(),numberRadius:p,onChange:this._onChangeHours,onSelect:this._onSelectHours})},e.prototype._renderMinutes=function(){return d.createElement(C,{center:this.state.center,radius:this.state.radius,spacing:this.state.radius*c,selected:this.state.time.minutes(),numberRadius:p,onChange:this._onChangeMinutes,onSelect:this._onSelectMinutes})},e.prototype._onChange=function(t){this.setState({time:t}),this.props.onChange&&this.props.onChange(t.clone())},e.prototype._calculateShape=function(){var t=this;null===this._raf&&(this._raf=requestAnimationFrame(function(){var e=Object(m.ensureNotNull)(t._clockFace).getBoundingClientRect(),n=e.left,o=e.top,r=e.width;t.setState({center:{x:n+r/2,y:o+r/2},radius:r/2}),t._raf=null}))},e}(d.PureComponent)},"Db/h":function(t,e,n){t.exports={errors:"errors-C3KBJakt-",show:"show-2G4PY7Uu-",error:"error-3G4k6KUC-"}},
|
|
Oehf:function(t,e,n){t.exports={clock:"clock-3pqBsiNm-",header:"header-pTWMGSpm-",number:"number-9PC9lvyt-",active:"active-1sonmMLV-",body:"body-2Q-g3GDd-",clockFace:"clockFace-eHYbqh-S-",face:"face-2iCoBAOV-",inner:"inner-1mVlhYbe-",hand:"hand-2ZG8pJQb-",knob:"knob-31dEppHa-",centerDot:"centerDot-210Fo0oV-"}},kSQs:function(t,e,n){"use strict";var o,r,s,i,a=n("mrSG"),c=n("q1tI"),p=n("TSYQ"),u=n("uqKQ"),h=n("i8i4"),l=n("Db/h"),d=n("Ialn");n.d(e,"b",function(){return o}),n.d(e,"a",function(){return r}),o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a.__extends(e,t),e.prototype.render=function(){var t,e,n,o=this.props,r=o.children,s=void 0===r?[]:r,i=o.show,u=void 0!==i&&i,h=o.customErrorClass,m=p(l.errors,((t={})[l.show]=u,t),h),f=s.map(function(t,e){return c.createElement("div",{className:l.error,key:e},t)}),_={position:"absolute",top:this.props.top,width:this.props.width,height:this.props.height,bottom:void 0!==this.props.bottom?this.props.bottom:"100%",right:void 0!==this.props.right?this.props.right:0,left:this.props.left,zIndex:this.props.zIndex};return d.IS_RTL&&(e=_.left,n=_.right,_=a.__assign({},_,{left:n,right:e})),c.createElement("div",{style:_,className:m},f)},e}(c.PureComponent),r=Object(u.a)((s=o,(i=function(t){function e(e){var n=t.call(this,e)||this;return n._getComponentInstance=function(t){n._instance=t},n._throttleCalcProps=function(){requestAnimationFrame(function(){return n._calcProps(n.props)})},n.state={bottom:n.props.bottom,left:n.props.left,right:n.props.right,top:"number"==typeof n.props.top?n.props.top:-1e4,width:n.props.inheritWidthFromTarget?n.props.target&&n.props.target.getBoundingClientRect().width:n.props.width},n}return a.__extends(e,t),e.prototype.componentDidMount=function(){this._instanceElem=h.findDOMNode(this._instance),this.props.attachOnce||this._subscribe(),this._calcProps(this.props)},e.prototype.componentWillReceiveProps=function(t){if(t.top!==this.props.top&&this.setState({top:t.top}),t.left!==this.props.left&&this.setState({left:t.left}),t.width!==this.props.width&&this.setState({width:t.width}),t.attachmentCommand!==this.props.attachmentCommand&&t.attachmentCommand)switch(t.attachmentCommand.name){case"update":this._calcProps(t)}},e.prototype.componentDidUpdate=function(t){t.children!==this.props.children&&this._calcProps(this.props)},e.prototype.render=function(){return c.createElement(s,a.__assign({},this.props,{ref:this._getComponentInstance,top:this.state.top,bottom:void 0!==this.state.bottom?this.state.bottom:"auto",right:void 0!==this.state.right?this.state.right:"auto",left:this.state.left,width:this.state.width}),this.props.children)},e.prototype.componentWillUnmount=function(){this._unsubsribe()},e.prototype._calcProps=function(t){var e,n,o,r,s;if(t.target&&t.attachment&&t.targetAttachment){switch(e=this._calcTargetProps(t.target,t.attachment,t.targetAttachment),o=(n=this.props).width,s={width:void 0===(r=n.inheritWidthFromTarget)||r?e.width:o},t.attachment.vertical){case"bottom":case"middle":s.top=e.y;break;default:
|
|
s[t.attachment.vertical]=e.y}switch(t.attachment.horizontal){case"right":case"center":s.left=e.x;break;default:s[t.attachment.horizontal]=e.x}this.setState(s)}},e.prototype._calcTargetProps=function(t,e,n){var o=t.getBoundingClientRect(),r=this._instanceElem.getBoundingClientRect(),s="parent"===this.props.root?this._getCoordsRelToParentEl(t,o):this._getCoordsRelToDocument(o),i=this._getDimensions(r),a=this._getDimensions(o),c=a.width,p=0,u=0;switch(e.vertical){case"top":u=s[n.vertical];break;case"bottom":u=s[n.vertical]-i.height;break;case"middle":u=s[n.vertical]-i.height/2}switch(e.horizontal){case"left":p=s[n.horizontal];break;case"right":p=s[n.horizontal]-i.width;break;case"center":p=s[n.horizontal]-i.width/2}return"number"==typeof this.props.attachmentOffsetY&&(u+=this.props.attachmentOffsetY),"number"==typeof this.props.attachmentOffsetX&&(p+=this.props.attachmentOffsetX),{x:p,y:u,width:c}},e.prototype._getCoordsRelToDocument=function(t){var e=pageYOffset,n=pageXOffset,o=t.top+e,r=t.bottom+e,s=t.left+n,i=t.right+n,a=(o+t.height)/2,c=s+t.width/2;return{top:o,bottom:r,left:s,right:i,middle:a,center:c}},e.prototype._getCoordsRelToParentEl=function(t,e){var n=t.offsetParent,o=n.scrollTop,r=n.scrollLeft,s=t.offsetTop+o,i=t.offsetLeft+r,a=e.width+i,c=e.height+s,p=(s+e.height)/2,u=(i+e.width)/2;return{top:s,bottom:c,left:i,right:a,middle:p,center:u}},e.prototype._getDimensions=function(t){return{height:t.height,width:t.width}},e.prototype._subscribe=function(){"document"===this.props.root&&(window.addEventListener("scroll",this._throttleCalcProps,!0),window.addEventListener("resize",this._throttleCalcProps))},e.prototype._unsubsribe=function(){window.removeEventListener("scroll",this._throttleCalcProps,!0),window.removeEventListener("resize",this._throttleCalcProps)},e}(c.PureComponent)).displayName="Attachable Component",i))},nPPD:function(t,e,n){"use strict";function o(t,e,n){var o,r,s,i,a;for(void 0===n&&(n={}),o=Object.assign({},e),r=0,s=Object.keys(e);r<s.length;r++)(a=n[i=s[r]]||i)in t&&(o[i]=[t[a],e[i]].join(" "));return o}function r(t,e,n){return void 0===n&&(n={}),Object.assign({},t,o(t,e,n))}n.d(e,"b",function(){return o}),n.d(e,"a",function(){return r})}}]); |