Skip to content

Commit

Permalink
Fix: lint issue
Browse files Browse the repository at this point in the history
  • Loading branch information
leftstick committed Nov 3, 2017
1 parent 5ba5f64 commit de877f9
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion demo/components/apidoc/docBaidumap.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'
import { Component } from '@angular/core'

import { MapOptions } from '../../../src'

Expand Down
3 changes: 1 addition & 2 deletions demo/components/apidoc/docControl.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'
import { Component } from '@angular/core'

import {
ControlAnchor,
Expand All @@ -8,7 +8,6 @@ import {
NavigationControlOptions,
NavigationControlType,
OverviewMapControlOptions,
Point,
ScaleControlOptions
} from '../../../src'

Expand Down
2 changes: 1 addition & 1 deletion demo/components/apidoc/docMarker.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit } from '@angular/core'
import { Component } from '@angular/core'

import { MapOptions, MarkerOptions, Point } from '../../../src'

Expand Down
2 changes: 1 addition & 1 deletion demo/components/apidoc/index.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component, OnDestroy, OnInit } from '@angular/core'
import { NavigationEnd, ParamMap, Router } from '@angular/router'
import { NavigationEnd, Router } from '@angular/router'

import { Subscription } from 'rxjs'

Expand Down
1 change: 0 additions & 1 deletion demo/components/apidoc/sidebar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ import { Component, Input } from '@angular/core'
<div class="api-nav-item" [class.active]="api === 'baidu-map'"><a href="#/apidoc/baidu-map">baidu-map</a></div>
<div class="api-nav-item" [class.active]="api === 'marker'"><a href="#/apidoc/marker">marker</a></div>
<div class="api-nav-item" [class.active]="api === 'control'"><a href="#/apidoc/control">control</a></div>
<div class="api-nav-item" [class.active]="api === 'overlay'"><a href="#/apidoc/overlay">overlay</a></div>
<div class="api-nav-header">Models</div>
<div class="api-nav-item" [class.active]="api === 'map-options'"><a href="#/apidoc/map-options">mapOptions</a></div>
<div class="api-nav-item" [class.active]="api === 'center-and-zoom'"><a href="#/apidoc/center-and-zoom">centerAndZoom</a></div>
Expand Down
2 changes: 1 addition & 1 deletion demo/components/home/index.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component } from '@angular/core'

import { BMapInstance, MapOptions, MarkerOptions, Point } from '../../../src'
import { BMapInstance, MapOptions, Point } from '../../../src'

@Component({
styles: [
Expand Down
13 changes: 4 additions & 9 deletions src/components/control.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
Directive,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output
} from '@angular/core'
import { Directive, Input, OnDestroy, OnInit } from '@angular/core'

import {
toGeolocationOptions,
Expand All @@ -16,7 +9,6 @@ import {
} from '../helpers/transformer'
import { nullCheck } from '../helpers/validate'
import { MapService } from '../providers/mapService'
import { BMap } from '../types/BMap'
import { BControl, ControlType } from '../types/Control'
import { BMapInstance } from '../types/Map'

Expand Down Expand Up @@ -67,6 +59,9 @@ export class ControlComponent implements OnInit, OnDestroy {
if (type === 'geolocation') {
return new window.BMap.GeolocationControl(toGeolocationOptions(options))
}
if (type === 'panorama') {
return new window.BMap.PanoramaControl()
}
return null
}
}
1 change: 0 additions & 1 deletion src/components/marker.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import {
import { toMarkerOptions, toPoint } from '../helpers/transformer'
import { nullCheck } from '../helpers/validate'
import { MapService } from '../providers/mapService'
import { BMap } from '../types/BMap'
import { BMapInstance } from '../types/Map'
import { BMarker, MarkerOptions } from '../types/Marker'
import { Point } from '../types/Point'
Expand Down
2 changes: 2 additions & 0 deletions src/types/BMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
BMapTypeControlConstructor,
BNavigationControlConstructor,
BOverviewMapControlConstructor,
BPanoramaControlConstructor,
BScaleControlConstructor
} from './Control'
import { BIconConstructor } from './Icon'
Expand All @@ -24,4 +25,5 @@ export interface BMap {
ScaleControl: BScaleControlConstructor
MapTypeControl: BMapTypeControlConstructor
GeolocationControl: BGeolocationConstructor
PanoramaControl: BPanoramaControlConstructor
}
6 changes: 6 additions & 0 deletions src/types/Control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ export interface BGeolocationConstructor extends BControlConstructor {
new (opts: BGeolocationControlOptions): BGeolocationControl
}

export interface BPanoramaControlConstructor extends BControlConstructor {
new (): BPanoramaControlControl
}

export interface BNavigationControl extends BControl {}

export interface BOverviewMapControl extends BControl {}
Expand All @@ -37,6 +41,8 @@ export interface BMapTypeControl extends BControl {}

export interface BGeolocationControl extends BControl {}

export interface BPanoramaControlControl extends BControl {}

export interface ControlOptions {
anchor?: ControlAnchor
offset?: Size
Expand Down
2 changes: 1 addition & 1 deletion src/types/Marker.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BIconConstructor, Icon } from './Icon'
import { Overlay } from './Overlay'
import { BPointConstructor, Point } from './Point'
import { BPointConstructor } from './Point'
import { BSizeConstructor, Size } from './Size'

export interface BMarkerConstructor {
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"named-imports-order": "lowercase-first",
"grouped-imports": true
}
]
],
"no-unused-variable": true
}
}

0 comments on commit de877f9

Please sign in to comment.