Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
4a380384
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4a380384
编写于
7月 16, 2019
作者:
P
pi1024e
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added clear input method to clear disposables.
上级
16219067
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
294 addition
and
291 deletion
+294
-291
src/vs/base/browser/ui/sash/sash.ts
src/vs/base/browser/ui/sash/sash.ts
+70
-68
src/vs/workbench/contrib/extensions/browser/extensionEditor.ts
...s/workbench/contrib/extensions/browser/extensionEditor.ts
+224
-223
未找到文件。
src/vs/base/browser/ui/sash/sash.ts
浏览文件 @
4a380384
...
...
@@ -208,93 +208,95 @@ export class Sash extends Disposable {
}
}
if
(
!
this
.
state
)
{
return
;
}
if
(
this
.
state
)
{
// Select both iframes and webviews; internally Electron nests an iframe
// in its <webview> component, but this isn't queryable.
const
iframes
=
[
...
getElementsByTagName
(
'
iframe
'
),
...
getElementsByTagName
(
'
webview
'
),
];
for
(
const
iframe
of
iframes
)
{
iframe
.
style
.
pointerEvents
=
'
none
'
;
// disable mouse events on iframes as long as we drag the sash
}
const
mouseDownEvent
=
new
StandardMouseEvent
(
e
);
const
startX
=
mouseDownEvent
.
posx
;
const
startY
=
mouseDownEvent
.
posy
;
const
altKey
=
mouseDownEvent
.
altKey
;
const
startEvent
:
ISashEvent
=
{
startX
,
currentX
:
startX
,
startY
,
currentY
:
startY
,
altKey
};
addClass
(
this
.
el
,
'
active
'
);
this
.
_onDidStart
.
fire
(
startEvent
);
// fix https://github.com/Microsoft/vscode/issues/21675
const
style
=
createStyleSheet
(
this
.
el
);
const
updateStyle
=
()
=>
{
let
cursor
=
''
;
if
(
isMultisashResize
)
{
cursor
=
'
all-scroll
'
;
}
else
if
(
this
.
orientation
===
Orientation
.
HORIZONTAL
)
{
if
(
this
.
state
===
SashState
.
Minimum
)
{
cursor
=
'
s-resize
'
;
}
else
if
(
this
.
state
===
SashState
.
Maximum
)
{
cursor
=
'
n-resize
'
;
}
else
{
cursor
=
isMacintosh
?
'
row-resize
'
:
'
ns-resize
'
;
}
}
else
{
if
(
this
.
state
===
SashState
.
Minimum
)
{
cursor
=
'
e-resize
'
;
}
else
if
(
this
.
state
===
SashState
.
Maximum
)
{
cursor
=
'
w-resize
'
;
// Select both iframes and webviews; internally Electron nests an iframe
// in its <webview> component, but this isn't queryable.
const
iframes
=
[
...
getElementsByTagName
(
'
webview
'
),
...
getElementsByTagName
(
'
iframe
'
),
];
for
(
const
iframe
of
iframes
)
{
iframe
.
style
.
pointerEvents
=
'
none
'
;
// disable mouse events on iframes as long as we drag the sash
}
const
mouseDownEvent
=
new
StandardMouseEvent
(
e
);
const
startX
=
mouseDownEvent
.
posx
;
const
startY
=
mouseDownEvent
.
posy
;
const
altKey
=
mouseDownEvent
.
altKey
;
const
startEvent
:
ISashEvent
=
{
startX
,
currentX
:
startX
,
startY
,
currentY
:
startY
,
altKey
};
addClass
(
this
.
el
,
'
active
'
);
this
.
_onDidStart
.
fire
(
startEvent
);
// fix https://github.com/Microsoft/vscode/issues/21675
const
style
=
createStyleSheet
(
this
.
el
);
const
updateStyle
=
()
=>
{
let
cursor
=
''
;
if
(
isMultisashResize
)
{
cursor
=
'
all-scroll
'
;
}
else
if
(
this
.
orientation
===
Orientation
.
HORIZONTAL
)
{
if
(
this
.
state
===
SashState
.
Minimum
)
{
cursor
=
'
s-resize
'
;
}
else
if
(
this
.
state
===
SashState
.
Maximum
)
{
cursor
=
'
n-resize
'
;
}
else
{
cursor
=
isMacintosh
?
'
row-resize
'
:
'
ns-resize
'
;
}
}
else
{
cursor
=
isMacintosh
?
'
col-resize
'
:
'
ew-resize
'
;
if
(
this
.
state
===
SashState
.
Minimum
)
{
cursor
=
'
e-resize
'
;
}
else
if
(
this
.
state
===
SashState
.
Maximum
)
{
cursor
=
'
w-resize
'
;
}
else
{
cursor
=
isMacintosh
?
'
col-resize
'
:
'
ew-resize
'
;
}
}
}
style
.
innerHTML
=
`* { cursor:
${
cursor
}
!important; }`
;
};
style
.
innerHTML
=
`* { cursor:
${
cursor
}
!important; }`
;
};
const
disposables
=
new
DisposableStore
();
const
disposables
=
new
DisposableStore
();
updateStyle
();
updateStyle
();
if
(
!
isMultisashResize
)
{
this
.
onDidEnablementChange
(
updateStyle
,
null
,
disposables
);
}
if
(
!
isMultisashResize
)
{
this
.
onDidEnablementChange
(
updateStyle
,
null
,
disposables
);
}
const
onMouseMove
=
(
e
:
MouseEvent
)
=>
{
EventHelper
.
stop
(
e
,
false
);
const
mouseMoveEvent
=
new
StandardMouseEvent
(
e
);
const
event
:
ISashEvent
=
{
startX
,
currentX
:
mouseMoveEvent
.
posx
,
startY
,
currentY
:
mouseMoveEvent
.
posy
,
altKey
};
const
onMouseMove
=
(
e
:
MouseEvent
)
=>
{
EventHelper
.
stop
(
e
,
false
);
const
mouseMoveEvent
=
new
StandardMouseEvent
(
e
);
const
event
:
ISashEvent
=
{
startX
,
currentX
:
mouseMoveEvent
.
posx
,
startY
,
currentY
:
mouseMoveEvent
.
posy
,
altKey
};
this
.
_onDidChange
.
fire
(
event
);
};
this
.
_onDidChange
.
fire
(
event
);
};
const
onMouseUp
=
(
e
:
MouseEvent
)
=>
{
EventHelper
.
stop
(
e
,
false
);
const
onMouseUp
=
(
e
:
MouseEvent
)
=>
{
EventHelper
.
stop
(
e
,
false
);
this
.
el
.
removeChild
(
style
);
this
.
el
.
removeChild
(
style
);
removeClass
(
this
.
el
,
'
active
'
);
this
.
_onDidEnd
.
fire
();
removeClass
(
this
.
el
,
'
active
'
);
this
.
_onDidEnd
.
fire
();
disposables
.
dispose
();
disposables
.
dispose
();
for
(
const
iframe
of
iframes
)
{
iframe
.
style
.
pointerEvents
=
'
auto
'
;
}
};
for
(
const
iframe
of
iframes
)
{
iframe
.
style
.
pointerEvents
=
'
auto
'
;
}
};
domEvent
(
window
,
'
mousemove
'
)(
onMouseMove
,
null
,
disposables
);
domEvent
(
window
,
'
mouseup
'
)(
onMouseUp
,
null
,
disposables
);
domEvent
(
window
,
'
mousemove
'
)(
onMouseMove
,
null
,
disposables
);
domEvent
(
window
,
'
mouseup
'
)(
onMouseUp
,
null
,
disposables
);
}
}
private
onMouseDoubleClick
(
event
:
MouseEvent
):
void
{
this
.
_onDidReset
.
fire
();
}
...
...
src/vs/workbench/contrib/extensions/browser/extensionEditor.ts
浏览文件 @
4a380384
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录