Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
x649585723
incubator-echarts
提交
65ead2bf
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,发现更多精彩内容 >>
提交
65ead2bf
编写于
9月 12, 2018
作者:
S
sushuang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix map problem brought from geo upgrade.
上级
fa477050
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
19 addition
and
20 deletion
+19
-20
src/coord/geo/Geo.js
src/coord/geo/Geo.js
+6
-7
src/coord/geo/geoCreator.js
src/coord/geo/geoCreator.js
+13
-13
未找到文件。
src/coord/geo/Geo.js
浏览文件 @
65ead2bf
...
...
@@ -33,8 +33,9 @@ import geoSourceManager from './geoSourceManager';
* Specify the positioned areas by left, top, width, height
* @param {Object.<string, string>} [nameMap]
* Specify name alias
* @param {boolean} [invertLongitute=true]
*/
function
Geo
(
name
,
map
,
nameMap
)
{
function
Geo
(
name
,
map
,
nameMap
,
invertLongitute
)
{
View
.
call
(
this
,
name
);
...
...
@@ -48,6 +49,7 @@ function Geo(name, map, nameMap) {
this
.
_nameCoordMap
=
source
.
nameCoordMap
;
this
.
_regionsMap
=
source
.
nameCoordMap
;
this
.
_invertLongitute
=
invertLongitute
==
null
?
true
:
invertLongitute
;
/**
* @readOnly
...
...
@@ -92,14 +94,11 @@ Geo.prototype = {
*/
transformTo
:
function
(
x
,
y
,
width
,
height
)
{
var
rect
=
this
.
getBoundingRect
();
// FIXME
// Should not name it as invertLng.
var
invertLng
=
this
.
invertLng
;
var
invertLongitute
=
this
.
_invertLongitute
;
rect
=
rect
.
clone
();
if
(
invertL
ng
)
{
if
(
invertL
ongitute
)
{
// Longitute is inverted
rect
.
y
=
-
rect
.
y
-
rect
.
height
;
}
...
...
@@ -112,7 +111,7 @@ Geo.prototype = {
rawTransformable
.
decomposeTransform
();
if
(
invertL
ng
)
{
if
(
invertL
ongitute
)
{
var
scale
=
rawTransformable
.
scale
;
scale
[
1
]
=
-
scale
[
1
];
}
...
...
src/coord/geo/geoCreator.js
浏览文件 @
65ead2bf
...
...
@@ -134,29 +134,28 @@ var geoCreator = {
// FIXME Create each time may be slow
ecModel
.
eachComponent
(
'
geo
'
,
function
(
geoModel
,
idx
)
{
var
name
=
geoModel
.
get
(
'
map
'
);
var
geo
=
new
Geo
(
name
+
idx
,
name
,
geoModel
.
get
(
'
nameMap
'
));
geo
.
zoomLimit
=
geoModel
.
get
(
'
scaleLimit
'
);
geoList
.
push
(
geo
);
setGeoCoords
(
geo
,
geoModel
);
geoModel
.
coordinateSystem
=
geo
;
geo
.
model
=
geoModel
;
// FIXME ???
var
aspectScale
=
geoModel
.
get
(
'
aspectScale
'
);
var
invertL
ng
=
true
;
var
invertL
ongitute
=
true
;
var
mapRecords
=
mapDataStorage
.
retrieveMap
(
name
);
if
(
mapRecords
&&
mapRecords
[
0
]
&&
mapRecords
[
0
].
type
===
'
svg
'
)
{
aspectScale
==
null
&&
(
aspectScale
=
1
);
invertL
ng
=
false
;
invertL
ongitute
=
false
;
}
else
{
aspectScale
==
null
&&
(
aspectScale
=
0.75
);
}
var
geo
=
new
Geo
(
name
+
idx
,
name
,
geoModel
.
get
(
'
nameMap
'
),
invertLongitute
);
geo
.
aspectScale
=
aspectScale
;
geo
.
invertLng
=
invertLng
;
geo
.
zoomLimit
=
geoModel
.
get
(
'
scaleLimit
'
);
geoList
.
push
(
geo
);
setGeoCoords
(
geo
,
geoModel
);
geoModel
.
coordinateSystem
=
geo
;
geo
.
model
=
geoModel
;
// Inject resize method
geo
.
resize
=
resizeGeo
;
...
...
@@ -196,6 +195,7 @@ var geoCreator = {
// Inject resize method
geo
.
resize
=
resizeGeo
;
geo
.
aspectScale
=
mapSeries
[
0
].
get
(
'
aspectScale
'
);
geo
.
resize
(
mapSeries
[
0
],
api
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录