提交 e25f1dcb 编写于 作者: 1 100pah

ts: Do the same thing as the last commit to extension-src.

上级 1c8262fb
parser: "@typescript-eslint/parser"
parserOptions:
# If using ES Module, ecmaVersion have to be set as `2015`.
ecmaVersion: 2015
sourceType: "module"
ecmaVersion: 6
sourceType: module
ecmaFeatures:
modules: true
project: "tsconfig.json"
plugins: ["@typescript-eslint"]
env:
browser: true
node: true
......@@ -10,6 +14,7 @@ globals:
jQuery: true
Promise: true
rules:
# Check the rules in: node_modules/@typescript-eslint/eslint-plugin/README.md
no-console:
- 2
-
......@@ -32,7 +37,7 @@ rules:
no-unreachable: 2
use-isnan: 2
valid-typeof: 2
block-scoped-var: 0
block-scoped-var: 2
curly:
- 2
- "all"
......@@ -59,7 +64,7 @@ rules:
no-octal: 2
no-octal-escape: 2
no-proto: 2
no-redeclare: 0
no-redeclare: 2
no-self-compare: 2
no-unneeded-ternary: 2
no-with: 2
......@@ -74,12 +79,8 @@ rules:
no-shadow-restricted-names: 2
no-undef: 2
no-undef-init: 2
no-unused-vars:
- 2
-
vars: "local"
args: "none"
no-use-before-define: 0
"no-use-before-define": "off"
"@typescript-eslint/no-use-before-define": 2
brace-style:
- 2
- "stroustrup"
......@@ -95,7 +96,7 @@ rules:
new-parens: 2
no-array-constructor: 2
no-multi-spaces:
- 2
- 1
-
ignoreEOLComments: true
exceptions:
......@@ -116,10 +117,12 @@ rules:
-
overrides:
"=": "after"
quotes:
"quotes": "off"
"@typescript-eslint/quotes":
- 2
- "single"
semi:
"semi": "off"
"@typescript-eslint/semi":
- 2
- "always"
semi-spacing: 2
......@@ -129,7 +132,8 @@ rules:
-
beforeColon: false
afterColon: true
space-before-function-paren:
"space-before-function-paren": "off"
"@typescript-eslint/space-before-function-paren":
- 2
-
anonymous: "always"
......@@ -178,7 +182,7 @@ rules:
allowParens: true
no-class-assign: 2
no-const-assign: 2
no-dupe-class-members: 2
# no-dupe-class-members: 2
no-this-before-super: 0
no-var: 0
no-duplicate-imports: 2
......@@ -186,4 +190,14 @@ rules:
unicode-bom: 2
max-statements-per-line: 2
no-useless-constructor: 0
\ No newline at end of file
no-useless-constructor: 0
"func-call-spacing": "off"
"@typescript-eslint/func-call-spacing": "error"
"no-unused-vars": "off"
"@typescript-eslint/no-unused-vars":
- 1
-
vars: "local"
args: "none"
\ No newline at end of file
......@@ -73,7 +73,7 @@ BMapCoordSys.prototype.dataToPoint = function (data) {
BMapCoordSys.prototype.pointToData = function (pt) {
var mapOffset = this._mapOffset;
var pt = this._bmap.overlayPixelToPoint({
pt = this._bmap.overlayPixelToPoint({
x: pt[0] + mapOffset[0],
y: pt[1] + mapOffset[1]
});
......@@ -165,6 +165,7 @@ BMapCoordSys.create = function (ecModel, api) {
if (bmapCoordSys) {
throw new Error('Only one bmap component can exist');
}
var bmap;
if (!bmapModel.__bmap) {
// Not support IE8
var bmapRoot = root.querySelector('.ec-extension-bmap');
......@@ -180,7 +181,7 @@ BMapCoordSys.create = function (ecModel, api) {
// Not support IE8
bmapRoot.classList.add('ec-extension-bmap');
root.appendChild(bmapRoot);
var bmap = bmapModel.__bmap = new BMap.Map(bmapRoot);
bmap = bmapModel.__bmap = new BMap.Map(bmapRoot);
var overlay = new Overlay(viewportRoot);
bmap.addOverlay(overlay);
......@@ -190,7 +191,7 @@ BMapCoordSys.create = function (ecModel, api) {
return {offsetLeft: 0, offsetTop: 0};
};
}
var bmap = bmapModel.__bmap;
bmap = bmapModel.__bmap;
// Set bmap options
// centerAndZoom before layout and render
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册