Skip to content

Commit

Permalink
Fixed bug with ghostAnimationPosition declaration.
Browse files Browse the repository at this point in the history
MarkerWithLabel now works with Spiderfier.
Updated version to 0.1.4.
Improved min files banner.
  • Loading branch information
viskin committed Mar 27, 2015
1 parent 7eb4a36 commit 641d85e
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function(grunt) {
uglify: {
options: {
sourceMap: true,
banner: '/*! <%= pkg.title %> v<%= pkg.version %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
banner: '/*! <%= grunt.task.current.target %> v<%= pkg.version %> <%= grunt.template.today("dd-mm-yyyy") %> (C) 2015 Terikon Software */\n'
},
SlidingMarker: {
src: 'SlidingMarker.js',
Expand Down
2 changes: 1 addition & 1 deletion MarkerWithGhost.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
var MarkerWithGhost = function (opt_options) {

this.ghostPosition = null;
this.animationGhostPosition = null;
this.ghostAnimationPosition = null;

// Call the parent constructor.
SlidingMarker.call(this, opt_options);
Expand Down
4 changes: 2 additions & 2 deletions dist/MarkerWithGhost.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/MarkerWithGhost.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/SlidingMarker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "marker-animate-unobtrusive",
"title": "SlidingMarker",
"version": "0.1.3",
"version": "0.1.4",
"description": "Unobtrusive Google Maps animated marker",
"main": "SlidingMarker.js",

Expand Down
6 changes: 4 additions & 2 deletions vendor/markerwithlabel.terikon.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,9 @@ MarkerLabel_.prototype.onAdd = function () {
MarkerLabel_.getSharedCross.processed = true;
}

var position_changed = this.marker_.animationPosition !== undefined ? "animationposition_changed" : "position_changed";
var position_changed = this.marker_.ghostAnimationPosition !== undefined ? "ghostanimationposition_changed"
: this.marker_.animationPosition !== undefined ? "animationPosition"
: "position_changed";

this.listeners_ = [
google.maps.event.addDomListener(this.eventDiv_, "mouseover", function (e) {
Expand Down Expand Up @@ -435,7 +437,7 @@ MarkerLabel_.prototype.setAnchor = function () {
* @private
*/
MarkerLabel_.prototype.setPosition = function (yOffset) {
var getPosition = this.marker_.getAnimationPosition || this.marker_.getPosition;
var getPosition = this.marker_.getGhostAnimationPosition || this.marker_.getAnimationPosition || this.marker_.getPosition;
var position = this.getProjection().fromLatLngToDivPixel(getPosition.call(this.marker_));
if (typeof yOffset === "undefined") {
yOffset = 0;
Expand Down

0 comments on commit 641d85e

Please sign in to comment.