example/public/ueditor/third-party/highcharts/highcharts.src.js
function (e) {

		var chart = this.chart,
			chartOptions = chart.options.chart,
			chartX = e.chartX,
			chartY = e.chartY,
			zoomHor = this.zoomHor,
			zoomVert = this.zoomVert,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			clickedInside,
			size,
			mouseDownX = this.mouseDownX,
			mouseDownY = this.mouseDownY;

		// If the mouse is outside the plot area, adjust to cooordinates
		// inside to prevent the selection marker from going outside
		if (chartX < plotLeft) {
			chartX = plotLeft;
		} else if (chartX > plotLeft + plotWidth) {
			chartX = plotLeft + plotWidth;
		}

		if (chartY < plotTop) {
			chartY = plotTop;
		} else if (chartY > plotTop + plotHeight) {
			chartY = plotTop + plotHeight;
		}
		
		// determine if the mouse has moved more than 10px
		this.hasDragged = Math.sqrt(
			Math.pow(mouseDownX - chartX, 2) +
			Math.pow(mouseDownY - chartY, 2)
		);
		if (this.hasDragged > 10) {
			clickedInside = chart.isInsidePlot(mouseDownX - plotLeft, mouseDownY - plotTop);

			// make a selection
			if (chart.hasCartesianSeries && (this.zoomX || this.zoomY) && clickedInside) {
				if (!this.selectionMarker) {
					this.selectionMarker = chart.renderer.rect(
						plotLeft,
						plotTop,
						zoomHor ? 1 : plotWidth,
						zoomVert ? 1 : plotHeight,
						0
					)
					.attr({
						fill: chartOptions.selectionMarkerFill || 'rgba(69,114,167,0.25)',
						zIndex: 7
					})
					.add();
				}
			}

			// adjust the width of the selection marker
			if (this.selectionMarker && zoomHor) {
				size = chartX - mouseDownX;
				this.selectionMarker.attr({
					width: mathAbs(size),
					x: (size > 0 ? 0 : size) + mouseDownX
				});
			}
			// adjust the height of the selection marker
			if (this.selectionMarker && zoomVert) {
				size = chartY - mouseDownY;
				this.selectionMarker.attr({
					height: mathAbs(size),
					y: (size > 0 ? 0 : size) + mouseDownY
				});
			}

			// panning
			if (clickedInside && !this.selectionMarker && chartOptions.panning) {
				chart.pan(e, chartOptions.panning);
			}
		}
	}
function (e) {

		var chart = this.chart,
			chartOptions = chart.options.chart,
			chartX = e.chartX,
			chartY = e.chartY,
			zoomHor = this.zoomHor,
			zoomVert = this.zoomVert,
			plotLeft = chart.plotLeft,
			plotTop = chart.plotTop,
			plotWidth = chart.plotWidth,
			plotHeight = chart.plotHeight,
			clickedInside,
			size,
			mouseDownX = this.mouseDownX,
			mouseDownY = this.mouseDownY;

		// If the mouse is outside the plot area, adjust to cooordinates
		// inside to prevent the selection marker from going outside
		if (chartX < plotLeft) {
			chartX = plotLeft;
		} else if (chartX > plotLeft + plotWidth) {
			chartX = plotLeft + plotWidth;
		}

		if (chartY < plotTop) {
			chartY = plotTop;
		} else if (chartY > plotTop + plotHeight) {
			chartY = plotTop + plotHeight;
		}
		
		// determine if the mouse has moved more than 10px
		this.hasDragged = Math.sqrt(
			Math.pow(mouseDownX - chartX, 2) +
			Math.pow(mouseDownY - chartY, 2)
		);
		if (this.hasDragged > 10) {
			clickedInside = chart.isInsidePlot(mouseDownX - plotLeft, mouseDownY - plotTop);

			// make a selection
			if (chart.hasCartesianSeries && (this.zoomX || this.zoomY) && clickedInside) {
				if (!this.selectionMarker) {
					this.selectionMarker = chart.renderer.rect(
						plotLeft,
						plotTop,
						zoomHor ? 1 : plotWidth,
						zoomVert ? 1 : plotHeight,
						0
					)
					.attr({
						fill: chartOptions.selectionMarkerFill || 'rgba(69,114,167,0.25)',
						zIndex: 7
					})
					.add();
				}
			}

			// adjust the width of the selection marker
			if (this.selectionMarker && zoomHor) {
				size = chartX - mouseDownX;
				this.selectionMarker.attr({
					width: mathAbs(size),
					x: (size > 0 ? 0 : size) + mouseDownX
				});
			}
			// adjust the height of the selection marker
			if (this.selectionMarker && zoomVert) {
				size = chartY - mouseDownY;
				this.selectionMarker.attr({
					height: mathAbs(size),
					y: (size > 0 ? 0 : size) + mouseDownY
				});
			}

			// panning
			if (clickedInside && !this.selectionMarker && chartOptions.panning) {
				chart.pan(e, chartOptions.panning);
			}
		}
	}
function ( e ) { var chart = this . chart , chartOptions = chart . options . chart , chartX = e . chartX , chartY = e . chartY , zoomHor = this . zoomHor , zoomVert = this . zoomVert , plotLeft = chart . plotLeft , plotTop = chart . plotTop , plotWidth = chart . plotWidth , plotHeight = chart . plotHeight , clickedInside , size , mouseDownX = this . mouseDownX , mouseDownY = this . mouseDownY ; // If the mouse is outside the plot area, adjust to cooordinates // inside to prevent the selection marker from going outside if ( chartX < plotLeft ) { chartX = plotLeft ; } else if ( chartX > plotLeft + plotWidth ) { chartX = plotLeft + plotWidth ; } if ( chartY < plotTop ) { chartY = plotTop ; } else if ( chartY > plotTop + plotHeight ) { chartY = plotTop + plotHeight ; } // determine if the mouse has moved more than 10px this . hasDragged = Math . sqrt ( Math . pow ( mouseDownX - chartX , 2 ) + Math . pow ( mouseDownY - chartY , 2 ) ) ; if ( this . hasDragged > 10 ) { clickedInside = chart . isInsidePlot ( mouseDownX - plotLeft , mouseDownY - plotTop ) ; // make a selection if ( chart . hasCartesianSeries && ( this . zoomX || this . zoomY ) && clickedInside ) { if ( ! this . selectionMarker ) { this . selectionMarker = chart . renderer . rect ( plotLeft , plotTop , zoomHor ? 1 : plotWidth , zoomVert ? 1 : plotHeight , 0 ) . attr ( { fill : chartOptions . selectionMarkerFill || 'rgba(69,114,167,0.25)' , zIndex : 7 } ) . add ( ) ; } } // adjust the width of the selection marker if ( this . selectionMarker && zoomHor ) { size = chartX - mouseDownX ; this . selectionMarker . attr ( { width : mathAbs ( size ) , x : ( size > 0 ? 0 : size ) + mouseDownX } ) ; } // adjust the height of the selection marker if ( this . selectionMarker && zoomVert ) { size = chartY - mouseDownY ; this . selectionMarker . attr ( { height : mathAbs ( size ) , y : ( size > 0 ? 0 : size ) + mouseDownY } ) ; } // panning if ( clickedInside && ! this . selectionMarker && chartOptions . panning ) { chart . pan ( e , chartOptions . panning ) ; } } }
Perform a drag operation in response to a mousemove event while the mouse is down
Perform a drag operation in response to a mousemove event while the mouse is down