example/public/ueditor/third-party/highcharts/modules/map.src.js
function () {
			var point = this,
				start = +new Date(),
				normalColor = Color(point.options.color),
				hoverColor = Color(point.pointAttr.hover.fill),
				animation = point.series.options.states.normal.animation,
				duration = animation && (animation.duration || 500);

			if (duration && normalColor.rgba.length === 4 && hoverColor.rgba.length === 4) {
				delete point.pointAttr[''].fill; // avoid resetting it in Point.setState

				clearTimeout(point.colorInterval);
				point.colorInterval = setInterval(function () {
					var pos = (new Date() - start) / duration,
						graphic = point.graphic;
					if (pos > 1) {
						pos = 1;
					}
					if (graphic) {
						graphic.attr('fill', tweenColors(hoverColor, normalColor, pos));
					}
					if (pos >= 1) {
						clearTimeout(point.colorInterval);
					}
				}, 13);
			}
			Point.prototype.onMouseOut.call(point);
		}
function () {
			var point = this,
				start = +new Date(),
				normalColor = Color(point.options.color),
				hoverColor = Color(point.pointAttr.hover.fill),
				animation = point.series.options.states.normal.animation,
				duration = animation && (animation.duration || 500);

			if (duration && normalColor.rgba.length === 4 && hoverColor.rgba.length === 4) {
				delete point.pointAttr[''].fill; // avoid resetting it in Point.setState

				clearTimeout(point.colorInterval);
				point.colorInterval = setInterval(function () {
					var pos = (new Date() - start) / duration,
						graphic = point.graphic;
					if (pos > 1) {
						pos = 1;
					}
					if (graphic) {
						graphic.attr('fill', tweenColors(hoverColor, normalColor, pos));
					}
					if (pos >= 1) {
						clearTimeout(point.colorInterval);
					}
				}, 13);
			}
			Point.prototype.onMouseOut.call(point);
		}
function ( ) { var point = this , start = + new Date ( ) , normalColor = Color ( point . options . color ) , hoverColor = Color ( point . pointAttr . hover . fill ) , animation = point . series . options . states . normal . animation , duration = animation && ( animation . duration || 500 ) ; if ( duration && normalColor . rgba . length === 4 && hoverColor . rgba . length === 4 ) { delete point . pointAttr [ '' ] . fill ; // avoid resetting it in Point.setState clearTimeout ( point . colorInterval ) ; point . colorInterval = setInterval ( function ( ) { var pos = ( new Date ( ) - start ) / duration , graphic = point . graphic ; if ( pos > 1 ) { pos = 1 ; } if ( graphic ) { graphic . attr ( 'fill' , tweenColors ( hoverColor , normalColor , pos ) ) ; } if ( pos >= 1 ) { clearTimeout ( point . colorInterval ) ; } } , 13 ) ; } Point . prototype . onMouseOut . call ( point ) ; }
Custom animation for tweening out the colors. Animation reduces blinking when hovering
over islands and coast lines. We run a custom implementation of animation becuase we
need to be able to run this independently from other animations like zoom redraw. Also,
adding color animation to the adapters would introduce almost the same amount of code.
Custom animation for tweening out the colors . Animation reduces blinking when hovering over islands and coast lines . We run a custom implementation of animation becuase we need to be able to run this independently from other animations like zoom redraw . Also adding color animation to the adapters would introduce almost the same amount of code .