Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
fc6f0922
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fc6f0922
编写于
6月 14, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Do not use translate3d in overview ruler, use will-change instead (Microsoft/monaco-editor#426)
上级
38f89523
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
3 addition
and
25 deletion
+3
-25
src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts
...owser/viewParts/overviewRuler/decorationsOverviewRuler.ts
+0
-5
src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts
...s/editor/browser/viewParts/overviewRuler/overviewRuler.ts
+0
-5
src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts
...itor/browser/viewParts/overviewRuler/overviewRulerImpl.ts
+3
-15
未找到文件。
src/vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler.ts
浏览文件 @
fc6f0922
...
@@ -46,7 +46,6 @@ export class DecorationsOverviewRuler extends ViewPart {
...
@@ -46,7 +46,6 @@ export class DecorationsOverviewRuler extends ViewPart {
'
decorationsOverviewRuler
'
,
'
decorationsOverviewRuler
'
,
this
.
_context
.
viewLayout
.
getScrollHeight
(),
this
.
_context
.
viewLayout
.
getScrollHeight
(),
this
.
_context
.
configuration
.
editor
.
lineHeight
,
this
.
_context
.
configuration
.
editor
.
lineHeight
,
this
.
_context
.
configuration
.
editor
.
canUseTranslate3d
,
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
DecorationsOverviewRuler
.
MIN_DECORATION_HEIGHT
,
DecorationsOverviewRuler
.
MIN_DECORATION_HEIGHT
,
DecorationsOverviewRuler
.
MAX_DECORATION_HEIGHT
,
DecorationsOverviewRuler
.
MAX_DECORATION_HEIGHT
,
...
@@ -101,10 +100,6 @@ export class DecorationsOverviewRuler extends ViewPart {
...
@@ -101,10 +100,6 @@ export class DecorationsOverviewRuler extends ViewPart {
this
.
_overviewRuler
.
setLineHeight
(
this
.
_context
.
configuration
.
editor
.
lineHeight
,
false
);
this
.
_overviewRuler
.
setLineHeight
(
this
.
_context
.
configuration
.
editor
.
lineHeight
,
false
);
}
}
if
(
e
.
canUseTranslate3d
)
{
this
.
_overviewRuler
.
setCanUseTranslate3d
(
this
.
_context
.
configuration
.
editor
.
canUseTranslate3d
,
false
);
}
if
(
e
.
pixelRatio
)
{
if
(
e
.
pixelRatio
)
{
this
.
_overviewRuler
.
setPixelRatio
(
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
false
);
this
.
_overviewRuler
.
setPixelRatio
(
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
false
);
}
}
...
...
src/vs/editor/browser/viewParts/overviewRuler/overviewRuler.ts
浏览文件 @
fc6f0922
...
@@ -25,7 +25,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
...
@@ -25,7 +25,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
cssClassName
,
cssClassName
,
this
.
_context
.
viewLayout
.
getScrollHeight
(),
this
.
_context
.
viewLayout
.
getScrollHeight
(),
this
.
_context
.
configuration
.
editor
.
lineHeight
,
this
.
_context
.
configuration
.
editor
.
lineHeight
,
this
.
_context
.
configuration
.
editor
.
canUseTranslate3d
,
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
minimumHeight
,
minimumHeight
,
maximumHeight
,
maximumHeight
,
...
@@ -48,10 +47,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
...
@@ -48,10 +47,6 @@ export class OverviewRuler extends ViewEventHandler implements IOverviewRuler {
this
.
_overviewRuler
.
setLineHeight
(
this
.
_context
.
configuration
.
editor
.
lineHeight
,
true
);
this
.
_overviewRuler
.
setLineHeight
(
this
.
_context
.
configuration
.
editor
.
lineHeight
,
true
);
}
}
if
(
e
.
canUseTranslate3d
)
{
this
.
_overviewRuler
.
setCanUseTranslate3d
(
this
.
_context
.
configuration
.
editor
.
canUseTranslate3d
,
true
);
}
if
(
e
.
pixelRatio
)
{
if
(
e
.
pixelRatio
)
{
this
.
_overviewRuler
.
setPixelRatio
(
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
true
);
this
.
_overviewRuler
.
setPixelRatio
(
this
.
_context
.
configuration
.
editor
.
pixelRatio
,
true
);
}
}
...
...
src/vs/editor/browser/viewParts/overviewRuler/overviewRulerImpl.ts
浏览文件 @
fc6f0922
...
@@ -10,6 +10,7 @@ import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/com
...
@@ -10,6 +10,7 @@ import { OverviewZoneManager, ColorZone, OverviewRulerZone } from 'vs/editor/com
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
import
{
OverviewRulerPosition
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
OverviewRulerPosition
}
from
'
vs/editor/common/config/editorOptions
'
;
import
{
ThemeType
,
LIGHT
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
ThemeType
,
LIGHT
}
from
'
vs/platform/theme/common/themeService
'
;
import
*
as
dom
from
'
vs/base/browser/dom
'
;
export
class
OverviewRulerImpl
{
export
class
OverviewRulerImpl
{
...
@@ -17,12 +18,11 @@ export class OverviewRulerImpl {
...
@@ -17,12 +18,11 @@ export class OverviewRulerImpl {
private
_domNode
:
FastDomNode
<
HTMLCanvasElement
>
;
private
_domNode
:
FastDomNode
<
HTMLCanvasElement
>
;
private
_lanesCount
:
number
;
private
_lanesCount
:
number
;
private
_zoneManager
:
OverviewZoneManager
;
private
_zoneManager
:
OverviewZoneManager
;
private
_canUseTranslate3d
:
boolean
;
private
_background
:
Color
;
private
_background
:
Color
;
constructor
(
constructor
(
canvasLeftOffset
:
number
,
cssClassName
:
string
,
scrollHeight
:
number
,
lineHeight
:
number
,
canvasLeftOffset
:
number
,
cssClassName
:
string
,
scrollHeight
:
number
,
lineHeight
:
number
,
canUseTranslate3d
:
boolean
,
pixelRatio
:
number
,
minimumHeight
:
number
,
maximumHeight
:
number
,
pixelRatio
:
number
,
minimumHeight
:
number
,
maximumHeight
:
number
,
getVerticalOffsetForLine
:
(
lineNumber
:
number
)
=>
number
getVerticalOffsetForLine
:
(
lineNumber
:
number
)
=>
number
)
{
)
{
this
.
_canvasLeftOffset
=
canvasLeftOffset
;
this
.
_canvasLeftOffset
=
canvasLeftOffset
;
...
@@ -31,10 +31,10 @@ export class OverviewRulerImpl {
...
@@ -31,10 +31,10 @@ export class OverviewRulerImpl {
this
.
_domNode
.
setClassName
(
cssClassName
);
this
.
_domNode
.
setClassName
(
cssClassName
);
this
.
_domNode
.
setPosition
(
'
absolute
'
);
this
.
_domNode
.
setPosition
(
'
absolute
'
);
dom
.
hintGPULayer
(
this
.
_domNode
.
domNode
);
this
.
_lanesCount
=
3
;
this
.
_lanesCount
=
3
;
this
.
_canUseTranslate3d
=
canUseTranslate3d
;
this
.
_background
=
null
;
this
.
_background
=
null
;
this
.
_zoneManager
=
new
OverviewZoneManager
(
getVerticalOffsetForLine
);
this
.
_zoneManager
=
new
OverviewZoneManager
(
getVerticalOffsetForLine
);
...
@@ -127,13 +127,6 @@ export class OverviewRulerImpl {
...
@@ -127,13 +127,6 @@ export class OverviewRulerImpl {
}
}
}
}
public
setCanUseTranslate3d
(
canUseTranslate3d
:
boolean
,
render
:
boolean
):
void
{
this
.
_canUseTranslate3d
=
canUseTranslate3d
;
if
(
render
)
{
this
.
render
(
true
);
}
}
public
setPixelRatio
(
pixelRatio
:
number
,
render
:
boolean
):
void
{
public
setPixelRatio
(
pixelRatio
:
number
,
render
:
boolean
):
void
{
this
.
_zoneManager
.
setPixelRatio
(
pixelRatio
);
this
.
_zoneManager
.
setPixelRatio
(
pixelRatio
);
this
.
_domNode
.
setWidth
(
this
.
_zoneManager
.
getDOMWidth
());
this
.
_domNode
.
setWidth
(
this
.
_zoneManager
.
getDOMWidth
());
...
@@ -156,11 +149,6 @@ export class OverviewRulerImpl {
...
@@ -156,11 +149,6 @@ export class OverviewRulerImpl {
if
(
this
.
_zoneManager
.
getOuterHeight
()
===
0
)
{
if
(
this
.
_zoneManager
.
getOuterHeight
()
===
0
)
{
return
false
;
return
false
;
}
}
if
(
this
.
_canUseTranslate3d
)
{
this
.
_domNode
.
setTransform
(
'
translate3d(0px, 0px, 0px)
'
);
}
else
{
this
.
_domNode
.
setTransform
(
''
);
}
const
width
=
this
.
_zoneManager
.
getCanvasWidth
();
const
width
=
this
.
_zoneManager
.
getCanvasWidth
();
const
height
=
this
.
_zoneManager
.
getCanvasHeight
();
const
height
=
this
.
_zoneManager
.
getCanvasHeight
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录