Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
7e6a433b
I
incubator-echarts
项目概览
x649585723
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
I
incubator-echarts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7e6a433b
编写于
6月 15, 2016
作者:
P
pah100
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
datazoom throttle tweak
上级
f8cd2b78
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
13 deletion
+35
-13
src/component/dataZoom/DataZoomModel.js
src/component/dataZoom/DataZoomModel.js
+28
-3
src/component/dataZoom/InsideZoomView.js
src/component/dataZoom/InsideZoomView.js
+2
-1
src/component/dataZoom/SliderZoomModel.js
src/component/dataZoom/SliderZoomModel.js
+0
-7
src/model/Global.js
src/model/Global.js
+5
-2
未找到文件。
src/component/dataZoom/DataZoomModel.js
浏览文件 @
7e6a433b
...
...
@@ -40,8 +40,10 @@ define(function(require) {
// the filtered points when filterModel is set to 'empty', but
// be connected when set to 'filter'.
throttle
:
100
,
// Dispatch action by the fixed rate, avoid frequency.
throttle
:
null
,
// Dispatch action by the fixed rate, avoid frequency.
// default 100. Do not throttle when use null/undefined.
// If animation === true and animationDurationUpdate > 0,
// default value is 100, otherwise 20.
start
:
0
,
// Start percent. 0 ~ 100
end
:
100
,
// End percent. 0 ~ 100
startValue
:
null
,
// Start value. If startValue specified, start is ignored.
...
...
@@ -76,6 +78,11 @@ define(function(require) {
*/
this
.
textStyleModel
;
/**
* @private
*/
this
.
_autoThrottle
=
true
;
var
rawOption
=
retrieveRaw
(
option
);
this
.
mergeDefaultAndTheme
(
option
,
ecModel
);
...
...
@@ -106,6 +113,8 @@ define(function(require) {
thisOption
.
realtime
=
false
;
}
this
.
_setDefaultThrottle
(
rawOption
);
processRangeProp
(
'
start
'
,
'
startValue
'
,
rawOption
,
thisOption
);
processRangeProp
(
'
end
'
,
'
endValue
'
,
rawOption
,
thisOption
);
...
...
@@ -292,6 +301,22 @@ define(function(require) {
return
is
;
},
/**
* @private
*/
_setDefaultThrottle
:
function
(
rawOption
)
{
// When first time user set throttle, auto throttle ends.
if
(
rawOption
.
hasOwnProperty
(
'
throttle
'
))
{
this
.
_autoThrottle
=
false
;
}
if
(
this
.
_autoThrottle
)
{
var
globalOption
=
this
.
ecModel
.
option
;
this
.
option
.
throttle
=
(
globalOption
.
animation
&&
globalOption
.
animationDurationUpdate
>
0
)
?
100
:
20
;
}
},
/**
* @public
*/
...
...
@@ -410,9 +435,9 @@ define(function(require) {
function
retrieveRaw
(
option
)
{
var
ret
=
{};
each
(
[
'
start
'
,
'
end
'
,
'
startValue
'
,
'
endValue
'
],
[
'
start
'
,
'
end
'
,
'
startValue
'
,
'
endValue
'
,
'
throttle
'
],
function
(
name
)
{
ret
[
name
]
=
option
[
name
]
;
option
.
hasOwnProperty
(
name
)
&&
(
ret
[
name
]
=
option
[
name
])
;
}
);
return
ret
;
...
...
src/component/dataZoom/InsideZoomView.js
浏览文件 @
7e6a433b
...
...
@@ -41,6 +41,7 @@ define(function (require) {
var
allCoordIds
=
zrUtil
.
map
(
coordInfoList
,
function
(
coordInfo
)
{
return
roams
.
generateCoordId
(
coordInfo
.
model
);
});
zrUtil
.
each
(
coordInfoList
,
function
(
coordInfo
)
{
var
coordModel
=
coordInfo
.
model
;
roams
.
register
(
...
...
@@ -50,7 +51,7 @@ define(function (require) {
allCoordIds
:
allCoordIds
,
coordinateSystem
:
coordModel
.
coordinateSystem
,
dataZoomId
:
dataZoomModel
.
id
,
throttleRa
g
e
:
dataZoomModel
.
get
(
'
throttle
'
,
true
),
throttleRa
t
e
:
dataZoomModel
.
get
(
'
throttle
'
,
true
),
panGetRange
:
bind
(
this
.
_onPan
,
this
,
coordInfo
),
zoomGetRange
:
bind
(
this
.
_onZoom
,
this
,
coordInfo
)
}
...
...
src/component/dataZoom/SliderZoomModel.js
浏览文件 @
7e6a433b
...
...
@@ -65,13 +65,6 @@ define(function(require) {
textStyle
:
{
color
:
'
#333
'
}
},
/**
* @override
*/
mergeOption
:
function
(
option
)
{
SliderZoomModel
.
superApply
(
this
,
'
mergeOption
'
,
arguments
);
}
});
...
...
src/model/Global.js
浏览文件 @
7e6a433b
...
...
@@ -189,8 +189,11 @@ define(function (require) {
resultItem
.
keyInfo
)
);
// Call optionUpdated after init
componentModel
.
optionUpdated
(
newCptOption
,
true
);
// Call optionUpdated after init.
// newCptOption has been used as componentModel.option
// and may be merged with theme and default, so pass null
// to avoid confusion.
componentModel
.
optionUpdated
(
null
,
true
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录