Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
半栈学徒
incubator-echarts
提交
a7f2c16c
I
incubator-echarts
项目概览
半栈学徒
/
incubator-echarts
与 Fork 源项目一致
从无法访问的项目Fork
通知
5
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,发现更多精彩内容 >>
提交
a7f2c16c
编写于
7月 22, 2020
作者:
P
pissang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(state): not blur others when highlighting with axisPointer
上级
a7c0d8c2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
8 deletion
+26
-8
src/component/axisPointer/axisTrigger.ts
src/component/axisPointer/axisTrigger.ts
+13
-5
src/echarts.ts
src/echarts.ts
+1
-1
src/util/states.ts
src/util/states.ts
+2
-2
src/util/types.ts
src/util/types.ts
+10
-0
未找到文件。
src/component/axisPointer/axisTrigger.ts
浏览文件 @
a7f2c16c
...
...
@@ -22,7 +22,7 @@ import * as modelHelper from './modelHelper';
import
findPointFromSeries
from
'
./findPointFromSeries
'
;
import
GlobalModel
from
'
../../model/Global
'
;
import
ExtensionAPI
from
'
../../ExtensionAPI
'
;
import
{
Dictionary
,
Payload
,
CommonAxisPointerOption
}
from
'
../../util/types
'
;
import
{
Dictionary
,
Payload
,
CommonAxisPointerOption
,
HighlightPayload
,
DownplayPayload
}
from
'
../../util/types
'
;
import
AxisPointerModel
,
{
AxisPointerOption
}
from
'
./AxisPointerModel
'
;
import
{
each
,
curry
,
bind
,
extend
,
Curry1
}
from
'
zrender/src/core/util
'
;
import
{
ZRenderType
}
from
'
zrender/src/zrender
'
;
...
...
@@ -479,11 +479,19 @@ function dispatchHighDownActually(
});
toDownplay
.
length
&&
api
.
dispatchAction
({
type
:
'
downplay
'
,
escapeConnect
:
true
,
batch
:
toDownplay
});
type
:
'
downplay
'
,
escapeConnect
:
true
,
// Not blur others when highlight in axisPointer.
notBlur
:
true
,
batch
:
toDownplay
}
as
DownplayPayload
);
toHighlight
.
length
&&
api
.
dispatchAction
({
type
:
'
highlight
'
,
escapeConnect
:
true
,
batch
:
toHighlight
});
type
:
'
highlight
'
,
escapeConnect
:
true
,
// Not blur others when highlight in axisPointer.
notBlur
:
true
,
batch
:
toHighlight
}
as
HighlightPayload
);
}
function
findInputAxisInfo
(
...
...
src/echarts.ts
浏览文件 @
a7f2c16c
...
...
@@ -1360,7 +1360,7 @@ class ECharts extends Eventful {
// If dispatchAction before setOption, do nothing.
ecModel
&&
ecModel
.
eachComponent
(
condition
,
function
(
model
)
{
if
(
!
excludeSeriesIdMap
||
excludeSeriesIdMap
.
get
(
model
.
id
)
==
null
)
{
if
(
isHighDownPayload
(
payload
))
{
if
(
isHighDownPayload
(
payload
)
&&
!
payload
.
notBlur
)
{
if
(
model
instanceof
SeriesModel
)
{
toggleSeriesBlurStateFromPayload
(
model
,
payload
,
ecIns
);
}
...
...
src/util/states.ts
浏览文件 @
a7f2c16c
...
...
@@ -5,7 +5,7 @@ import { PatternObject } from 'zrender/src/graphic/Pattern';
import
{
GradientObject
}
from
'
zrender/src/graphic/Gradient
'
;
import
Element
,
{
ElementEvent
}
from
'
zrender/src/Element
'
;
import
Model
from
'
../model/Model
'
;
import
{
DisplayState
,
ECElement
,
ColorString
,
BlurScope
,
InnerFocus
,
Payload
,
ZRColor
}
from
'
./types
'
;
import
{
DisplayState
,
ECElement
,
ColorString
,
BlurScope
,
InnerFocus
,
Payload
,
ZRColor
,
HighlightPayload
,
DownplayPayload
}
from
'
./types
'
;
import
{
extend
,
indexOf
,
isArrayLike
,
isObject
,
keys
,
isArray
,
each
}
from
'
zrender/src/core/util
'
;
import
{
getECData
}
from
'
./graphic
'
;
import
*
as
colorTool
from
'
zrender/src/tool/color
'
;
...
...
@@ -669,7 +669,7 @@ export function isSelectChangePayload(payload: Payload) {
||
payloadType
===
TOGGLE_SELECT_ACTION_TYPE
;
}
export
function
isHighDownPayload
(
payload
:
Payload
)
{
export
function
isHighDownPayload
(
payload
:
Payload
)
:
payload
is
HighlightPayload
|
DownplayPayload
{
const
payloadType
=
payload
.
type
;
return
payloadType
===
HIGHLIGHT_ACTION_TYPE
||
payloadType
===
DOWNPLAY_ACTION_TYPE
;
...
...
src/util/types.ts
浏览文件 @
a7f2c16c
...
...
@@ -146,6 +146,16 @@ export interface Payload extends PayloadItem {
batch
?:
PayloadItem
[];
}
export
interface
HighlightPayload
extends
Payload
{
type
:
'
highlight
'
;
notBlur
?:
boolean
}
export
interface
DownplayPayload
extends
Payload
{
type
:
'
downplay
'
;
notBlur
?:
boolean
}
// Payload includes override anmation info
export
interface
PayloadAnimationPart
{
duration
?:
number
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录