Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大大大太阳yt
driver.js
提交
b3642596
D
driver.js
项目概览
大大大太阳yt
/
driver.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
driver.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
b3642596
编写于
3月 13, 2018
作者:
K
Kamran Ahmed
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
WIP - Remove canvas and use HTML/CSS
上级
64693607
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
23 addition
and
12 deletion
+23
-12
src/core/overlay.js
src/core/overlay.js
+11
-10
src/driver.scss
src/driver.scss
+12
-2
未找到文件。
src/core/overlay.js
浏览文件 @
b3642596
...
@@ -102,10 +102,8 @@ export default class Overlay {
...
@@ -102,10 +102,8 @@ export default class Overlay {
this
.
highlightedElement
=
null
;
this
.
highlightedElement
=
null
;
this
.
lastHighlightedElement
=
null
;
this
.
lastHighlightedElement
=
null
;
this
.
pageOverlay
.
style
.
display
=
'
none
'
;
this
.
pageOverlay
.
style
.
opacity
=
'
0
'
;
this
.
highlightStage
.
style
.
display
=
'
none
'
;
this
.
highlightStage
.
style
.
display
=
'
none
'
;
this
.
draw
();
}
}
/**
/**
...
@@ -118,19 +116,22 @@ export default class Overlay {
...
@@ -118,19 +116,22 @@ export default class Overlay {
return
;
return
;
}
}
// Make it two times the padding because, half will be given on left and half on right
const
requiredPadding
=
this
.
options
.
padding
*
2
;
// Show the overlay
// Show the overlay
this
.
pageOverlay
.
style
.
display
=
'
block
'
;
this
.
pageOverlay
.
style
.
opacity
=
`
${
this
.
options
.
opacity
}
`
;
this
.
highlightStage
.
style
.
display
=
'
block
'
;
const
elementSize
=
this
.
highlightedElement
.
getSize
();
const
width
=
(
this
.
positionToHighlight
.
right
-
this
.
positionToHighlight
.
left
)
+
(
requiredPadding
);
const
height
=
(
this
.
positionToHighlight
.
bottom
-
this
.
positionToHighlight
.
top
)
+
(
requiredPadding
);
// Show the stage
// Show the stage
this
.
highlightStage
.
style
.
display
=
'
block
'
;
this
.
highlightStage
.
style
.
display
=
'
block
'
;
this
.
highlightStage
.
style
.
position
=
'
absolute
'
;
this
.
highlightStage
.
style
.
position
=
'
absolute
'
;
this
.
highlightStage
.
style
.
width
=
`
${
elementSize
.
width
+
this
.
options
.
padding
}
px`
;
this
.
highlightStage
.
style
.
width
=
`
${
width
}
px`
;
this
.
highlightStage
.
style
.
height
=
`
${
elementSize
.
height
+
this
.
options
.
padding
}
px`
;
this
.
highlightStage
.
style
.
height
=
`
${
height
}
px`
;
this
.
highlightStage
.
style
.
top
=
`
${
this
.
positionToHighlight
.
top
}
px`
;
this
.
highlightStage
.
style
.
top
=
`
${
this
.
positionToHighlight
.
top
-
(
requiredPadding
/
2
)
}
px`
;
this
.
highlightStage
.
style
.
left
=
`
${
this
.
positionToHighlight
.
left
}
px`
;
this
.
highlightStage
.
style
.
left
=
`
${
this
.
positionToHighlight
.
left
-
(
requiredPadding
/
2
)
}
px`
;
// Element has been highlighted
// Element has been highlighted
this
.
highlightedElement
.
onHighlighted
();
this
.
highlightedElement
.
onHighlighted
();
...
...
src/driver.scss
浏览文件 @
b3642596
...
@@ -108,16 +108,21 @@ div#driver-popover-item {
...
@@ -108,16 +108,21 @@ div#driver-popover-item {
}
}
div
#driver-page-overlay
{
div
#driver-page-overlay
{
display
:
none
;
display
:
block
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
background
:
black
;
background
:
black
;
top
:
0
;
top
:
0
;
left
:
0
;
left
:
0
;
position
:
fixed
;
position
:
fixed
;
opacity
:
0
.7
;
opacity
:
0
;
pointer-events
:
none
;
pointer-events
:
none
;
z-index
:
100002
!
important
;
z-index
:
100002
!
important
;
-webkit-transition
:
all
0
.2s
;
-moz-transition
:
all
0
.2s
;
-ms-transition
:
all
0
.2s
;
-o-transition
:
all
0
.2s
;
transition
:
all
0
.2s
;
}
}
div
#driver-highlighted-element-stage
{
div
#driver-highlighted-element-stage
{
...
@@ -129,6 +134,11 @@ div#driver-highlighted-element-stage {
...
@@ -129,6 +134,11 @@ div#driver-highlighted-element-stage {
background
:
white
;
background
:
white
;
z-index
:
100003
!
important
;
z-index
:
100003
!
important
;
display
:
none
;
display
:
none
;
-webkit-transition
:
all
0
.2s
;
-moz-transition
:
all
0
.2s
;
-ms-transition
:
all
0
.2s
;
-o-transition
:
all
0
.2s
;
transition
:
all
0
.2s
;
}
}
.driver-highlighted-element
{
.driver-highlighted-element
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录