Skip to content

Commit 0312e45

Browse files
committed
fix offset
1 parent 9e2d4e4 commit 0312e45

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

build/docs/source/ngmap.custom-marker.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363
if (!_this.getProjection() || typeof _this.position.lng !== 'function') {
6464
return;
6565
}
66-
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.el.markerOffsetX : 0;
67-
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.el.markerOffsetX : 0;
66+
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.offsetX : 0;
67+
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.offsetX : 0;
6868
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
6969
var x = Math.round(posPixel.x - offsetX);
7070
var y = Math.round(posPixel.y - offsetY);

build/scripts/ng-map.debug.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,8 +524,8 @@ angular.module('ngMap', []);
524524
if (!_this.getProjection() || typeof _this.position.lng !== 'function') {
525525
return;
526526
}
527-
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.el.markerOffsetX : 0;
528-
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.el.markerOffsetX : 0;
527+
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.offsetX : 0;
528+
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.offsetX : 0;
529529
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
530530
var x = Math.round(posPixel.x - offsetX);
531531
var y = Math.round(posPixel.y - offsetY);

build/scripts/ng-map.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ angular.module('ngMap', []);
533533
if (!_this.getProjection() || typeof _this.position.lng !== 'function') {
534534
return;
535535
}
536-
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.el.markerOffsetX : 0;
537-
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.el.markerOffsetX : 0;
536+
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.offsetX : 0;
537+
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.offsetX : 0;
538538
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
539539
var x = Math.round(posPixel.x - offsetX);
540540
var y = Math.round(posPixel.y - offsetY);

build/scripts/ng-map.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/scripts/ng-map.no-dependency.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ angular.module('ngMap', []);
533533
if (!_this.getProjection() || typeof _this.position.lng !== 'function') {
534534
return;
535535
}
536-
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.el.markerOffsetX : 0;
537-
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.el.markerOffsetX : 0;
536+
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.offsetX : 0;
537+
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.offsetX : 0;
538538
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
539539
var x = Math.round(posPixel.x - offsetX);
540540
var y = Math.round(posPixel.y - offsetY);

config/karma.conf.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ module.exports = function(config) {
2020
'spec/lib/angular.js',
2121
'spec/lib/angular-mocks.js',
2222

23-
// polyfill
24-
'./node_modules/phantomjs-polyfill/bind-polyfill.js',
25-
2623
// our app
2724
'app.js',
2825
'controllers/*.js',

directives/custom-marker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
if (!_this.getProjection() || typeof _this.position.lng !== 'function') {
7373
return;
7474
}
75-
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.el.markerOffsetX : 0;
76-
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.el.markerOffsetX : 0;
75+
var offsetX = _this.el.hasOwnProperty('offsetX') ? _this.offsetX : 0;
76+
var offsetY = _this.el.hasOwnProperty('offsetY') ? _this.offsetX : 0;
7777
var posPixel = _this.getProjection().fromLatLngToDivPixel(_this.position);
7878
var x = Math.round(posPixel.x - offsetX);
7979
var y = Math.round(posPixel.y - offsetY);

0 commit comments

Comments
 (0)