소스 검색

improve the DivIcon style

tags/2.6.1
Caven Chen 4 년 전
부모
커밋
096ecf6b76
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7
    7
      modules/overlay/html/DivIcon.js

+ 7
- 7
modules/overlay/html/DivIcon.js 파일 보기

@@ -83,17 +83,17 @@ class DivIcon extends Overlay {
let y = windowCoord.y - this._delegate.offsetHeight / 2

if (this._style.position === 'topleft') {
x = windowCoord.x
y = windowCoord.y
} else if (this._style.position === 'topright') {
x = windowCoord.x - this._delegate.offsetWidth
y = windowCoord.y
} else if (this._style.position === 'bottomleft') {
y = windowCoord.y - this._delegate.offsetHeight
} else if (this._style.position === 'topright') {
x = windowCoord.x
y = windowCoord.y - this._delegate.offsetHeight
} else if (this._style.position === 'bottomright') {
} else if (this._style.position === 'bottomleft') {
x = windowCoord.x - this._delegate.offsetWidth
y = windowCoord.y - this._delegate.offsetHeight
y = windowCoord.y
} else if (this._style.position === 'bottomright') {
x = windowCoord.x
y = windowCoord.y
}
let translate3d = `translate3d(${Math.round(x)}px,${Math.round(y)}px, 0)`


Loading…
취소
저장