提交 debcd7f3 编写于 作者: S sushuang

release 4.0.2

上级 6b10351b
......@@ -9013,6 +9013,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -9048,13 +9053,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -9063,7 +9068,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10479,7 +10483,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14539,7 +14543,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20737,13 +20740,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -20942,7 +20952,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -21374,6 +21384,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -23550,10 +23594,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -35932,7 +35976,11 @@ var dataSelectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
此差异已折叠。
......@@ -9013,6 +9013,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -9048,13 +9053,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -9063,7 +9068,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10479,7 +10483,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14582,7 +14586,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20803,13 +20806,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -21008,7 +21018,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -21440,6 +21450,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -23616,10 +23660,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -36025,7 +36069,11 @@ var selectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
......@@ -75238,7 +75286,7 @@ TimelineView.extend({
var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;
var controlModel = timelineModel.getModel('controlStyle');
var showControl = controlModel.get('show');
var showControl = controlModel.get('show', true);
var controlSize = showControl ? controlModel.get('itemSize') : 0;
var controlGap = showControl ? controlModel.get('itemGap') : 0;
var sizePlusGap = controlSize + controlGap;
......@@ -75252,7 +75300,6 @@ TimelineView.extend({
var nextBtnPosition;
var axisExtent;
var controlPosition = controlModel.get('position', true);
var showControl = controlModel.get('show', true);
var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);
var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);
var showNextBtn = showControl && controlModel.get('showNextBtn', true);
此差异已折叠。
此差异已折叠。
......@@ -8716,6 +8716,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -8751,13 +8756,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -8766,7 +8771,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10165,7 +10169,7 @@ var painterCtors = {
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14169,7 +14173,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20202,13 +20205,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -20407,7 +20417,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -20839,6 +20849,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -22980,10 +23024,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -34739,7 +34783,11 @@ var dataSelectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
......
此差异已折叠。
......@@ -9013,6 +9013,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -9048,13 +9053,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -9063,7 +9068,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10479,7 +10483,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14539,7 +14543,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20737,13 +20740,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -20942,7 +20952,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -21374,6 +21384,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -23608,10 +23652,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -35990,7 +36034,11 @@ var dataSelectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
此差异已折叠。
......@@ -9013,6 +9013,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -9048,13 +9053,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -9063,7 +9068,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10479,7 +10483,7 @@ var instances$1 = {}; // ZRender实例map索引
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14582,7 +14586,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20803,13 +20806,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -21008,7 +21018,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -21440,6 +21450,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -23674,10 +23718,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -36083,7 +36127,11 @@ var selectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
......@@ -75296,7 +75344,7 @@ TimelineView.extend({
var mainLength = orient === 'vertical' ? viewRect.height : viewRect.width;
var controlModel = timelineModel.getModel('controlStyle');
var showControl = controlModel.get('show');
var showControl = controlModel.get('show', true);
var controlSize = showControl ? controlModel.get('itemSize') : 0;
var controlGap = showControl ? controlModel.get('itemGap') : 0;
var sizePlusGap = controlSize + controlGap;
......@@ -75310,7 +75358,6 @@ TimelineView.extend({
var nextBtnPosition;
var axisExtent;
var controlPosition = controlModel.get('position', true);
var showControl = controlModel.get('show', true);
var showPlayBtn = showControl && controlModel.get('showPlayBtn', true);
var showPrevBtn = showControl && controlModel.get('showPrevBtn', true);
var showNextBtn = showControl && controlModel.get('showNextBtn', true);
此差异已折叠。
此差异已折叠。
......@@ -8716,6 +8716,11 @@ Painter.prototype = {
finished = false;
}
if (scope.prevElClipPaths) {
// Needs restore the state. If last drawn element is in the clipping area.
ctx.restore();
}
ctx.restore();
}
......@@ -8751,13 +8756,13 @@ Painter.prototype = {
var clipPaths = el.__clipPaths;
// Optimize when clipping on group with several elements
if (scope.prevClipLayer !== currentLayer
if (!scope.prevElClipPaths
|| isClipPathChanged(clipPaths, scope.prevElClipPaths)
) {
// If has previous clipping state, restore from it
if (scope.prevElClipPaths) {
scope.prevClipLayer.ctx.restore();
scope.prevClipLayer = scope.prevElClipPaths = null;
currentLayer.ctx.restore();
scope.prevElClipPaths = null;
// Reset prevEl since context has been restored
scope.prevEl = null;
......@@ -8766,7 +8771,6 @@ Painter.prototype = {
if (clipPaths) {
ctx.save();
doClip(clipPaths, ctx);
scope.prevClipLayer = currentLayer;
scope.prevElClipPaths = clipPaths;
}
}
......@@ -10165,7 +10169,7 @@ var painterCtors = {
/**
* @type {string}
*/
var version$1 = '4.0.0';
var version$1 = '4.0.1';
/**
* Initializing a zrender instance
......@@ -14169,7 +14173,6 @@ function createPathOptions(str, opts) {
opts.applyTransform = function (m) {
transformPath(pathProxy, m);
this.dirty(true);
};
......@@ -20202,13 +20205,20 @@ function compatEC2ItemStyle(opt) {
}
}
function convertNormalEmphasis(opt, optType) {
function convertNormalEmphasis(opt, optType, useExtend) {
if (opt && opt[optType] && (opt[optType].normal || opt[optType].emphasis)) {
var normalOpt = opt[optType].normal;
var emphasisOpt = opt[optType].emphasis;
if (normalOpt) {
opt[optType] = normalOpt;
// Timeline controlStyle has other properties besides normal and emphasis
if (useExtend) {
opt[optType].normal = opt[optType].emphasis = null;
defaults(opt[optType], normalOpt);
}
else {
opt[optType] = normalOpt;
}
}
if (emphasisOpt) {
opt.emphasis = opt.emphasis || {};
......@@ -20407,7 +20417,7 @@ var compatStyle = function (option, isTheme) {
compatEC3CommonStyles(timelineOpt);
convertNormalEmphasis(timelineOpt, 'label');
convertNormalEmphasis(timelineOpt, 'itemStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle');
convertNormalEmphasis(timelineOpt, 'controlStyle', true);
convertNormalEmphasis(timelineOpt, 'checkpointStyle');
var data = timelineOpt.data;
......@@ -20839,6 +20849,40 @@ function retrieveRawValue(data, dataIndex, dim) {
return rawValueGetters[sourceFormat](dataItem, dataIndex, dimIndex, dimName);
}
/**
* Compatible with some cases (in pie, map) like:
* data: [{name: 'xx', value: 5, selected: true}, ...]
* where only sourceFormat is 'original' and 'objectRows' supported.
*
* ??? TODO
* Supported detail options in data item when using 'arrayRows'.
*
* @param {module:echarts/data/List} data
* @param {number} dataIndex
* @param {string} attr like 'selected'
*/
function retrieveRawAttr(data, dataIndex, attr) {
if (!data) {
return;
}
var sourceFormat = data.getProvider().getSource().sourceFormat;
if (sourceFormat !== SOURCE_FORMAT_ORIGINAL
&& sourceFormat !== SOURCE_FORMAT_OBJECT_ROWS
) {
return;
}
var dataItem = data.getRawDataItem(dataIndex);
if (sourceFormat === SOURCE_FORMAT_ORIGINAL && !isObject$1(dataItem)) {
dataItem = null;
}
if (dataItem) {
return dataItem[attr];
}
}
var DIMENSION_LABEL_REG = /\{@(.+?)\}/g;
// PENDING A little ugly
......@@ -23038,10 +23082,10 @@ var isFunction = isFunction$1;
var isObject = isObject$1;
var parseClassType = ComponentModel.parseClassType;
var version = '4.0.1';
var version = '4.0.2';
var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......@@ -34797,7 +34841,11 @@ var dataSelectableMixin = {
var valueDim = ecList.mapDimension('value');
var targetList = this._targetList = [];
for (var i = 0, len = ecList.count(); i < len; i++) {
targetList.push({name: ecList.getName(i), value: ecList.get(valueDim, i)});
targetList.push({
name: ecList.getName(i),
value: ecList.get(valueDim, i),
selected: retrieveRawAttr(ecList, i, 'selected')
});
}
}
this._selectTargetMap = reduce(targetList || [], function (targetMap, target) {
......
此差异已折叠。
{
"name": "echarts",
"version": "4.0.1",
"version": "4.0.2",
"description": "A powerful charting and visualization library for browser",
"keywords": [
"visualization",
......@@ -39,7 +39,7 @@
"prepublish": "node build/build.js --prepublish"
},
"dependencies": {
"zrender": "4.0.0"
"zrender": "4.0.1"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.31",
......@@ -58,6 +58,6 @@
"rollup": "0.50.0",
"rollup-plugin-node-resolve": "3.0.0",
"rollup-plugin-uglify": "2.0.1",
"zrender": "4.0.0"
"zrender": "4.0.1"
}
}
......@@ -41,10 +41,10 @@ var isFunction = zrUtil.isFunction;
var isObject = zrUtil.isObject;
var parseClassType = ComponentModel.parseClassType;
export var version = '4.0.1';
export var version = '4.0.2';
export var dependencies = {
zrender: '4.0.0'
zrender: '4.0.1'
};
var TEST_FRAME_REMAIN_TIME = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册