提交 66ead206 编写于 作者: L lang

tweak

上级 bf2f13f5
......@@ -13,13 +13,11 @@ var startCode = fs.readFileSync('wrap/start.js', 'utf-8');
var nutCode = fs.readFileSync('wrap/nut.js', 'utf-8');
var endCode = fs.readFileSync('wrap/end.js', 'utf-8');
mainCode = require('./optimizeString')(mainCode);
endCode = etpl.compile(endCode)({
parts: config.include
});
var sourceCode = [startCode, nutCode, mainCode, endCode].join('\n');
var sourceCode = [startCode, nutCode, require('./optimizeString')(mainCode), endCode].join('\n');
var ast = UglifyJS.parse(sourceCode);
/* jshint camelcase: false */
......@@ -32,5 +30,5 @@ ast.figure_out_scope();
ast.compute_char_frequency();
ast.mangle_names();
fs.writeFileSync('../dist/echarts.js', sourceCode, 'utf-8');
fs.writeFileSync('../dist/echarts.js', [startCode, nutCode, mainCode, endCode].join('\n'), 'utf-8');
fs.writeFileSync('../dist/echarts.min.js', ast.print_to_string(), 'utf-8');
\ No newline at end of file
......@@ -7,5 +7,6 @@ echarts.format = require('echarts/util/format');
/** for: ${parts} as ${mod} */
require("${mod}");
/** /for */
_global['echarts'] = echarts;
})(window);
exports['echarts'] = echarts;
}));
(function(_global){
(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['exports'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('b'));
} else {
// Browser globals
factory(root);
}
}(this, function (exports) {
\ No newline at end of file
......@@ -103,6 +103,10 @@ define(function (require) {
coordinateSystem: 'view',
legendHoverLink: true,
hoverAnimation: true,
layout: null,
x: 'center',
......
......@@ -122,8 +122,12 @@ define(function (require) {
var size = normalizeSymbolSize(data.getItemVisual(idx, 'symbolSize'));
function onEmphasis() {
var ratio = size[1] / size[0];
this.animateTo({
scale: [size[0] * 1.1, size[1] * 1.1]
scale: [
Math.max(size[0] * 1.1, size[0] + 6),
Math.max(size[1] * 1.1, size[1] + 6 * ratio)
]
}, 400, 'elasticOut');
}
function onNormal() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册