diff --git a/MarkerWithGhost.js b/MarkerWithGhost.js index 9dba165..f7267c1 100644 --- a/MarkerWithGhost.js +++ b/MarkerWithGhost.js @@ -1,4 +1,4 @@ -/* global define,module,require,google */ +/* global define,module,require */ (function (root, factory) { 'use strict'; @@ -7,7 +7,7 @@ define(['jquery', 'SlidingMarker'], factory.bind(null, root)); } else if (typeof module !== "undefined" && module !== null && module.exports != null) { // jshint ignore:line // Node module. - module.exports.MarkerWithGhost = factory(root, require('jquery'), require('SlidingMarker')); + module.exports = factory(window, require('jquery'), require('SlidingMarker')); } else { // Browser globals root.MarkerWithGhost = factory(root, root.jQuery, root.SlidingMarker); @@ -16,6 +16,8 @@ function (root, $, SlidingMarker) { 'use strict'; + var google = root.google; + //Let jQuery be soft dependency $ = $ || {}; $.extend = $.extend || function extend(obj) { diff --git a/SlidingMarker.js b/SlidingMarker.js index 654f5c7..c6cb84f 100644 --- a/SlidingMarker.js +++ b/SlidingMarker.js @@ -1,4 +1,4 @@ -/* global define,module,require,google */ +/* global define,module,require */ (function (root, factory) { 'use strict'; @@ -7,7 +7,7 @@ define(['jquery', 'markerAnimate'], factory.bind(null, root)); } else if (typeof module !== "undefined" && module !== null && module.exports != null) { // jshint ignore:line // Node module. - module.exports.SlidingMarker = factory(root, require('jquery')); + module.exports = factory(window, require('jquery')); } else { // Browser globals root.SlidingMarker = factory(root, root.jQuery); @@ -16,6 +16,8 @@ function (root, $) { 'use strict'; + var google = root.google; + //Let jQuery be soft dependency $ = $ || {}; $.extend = $.extend || function extend(obj) { diff --git a/bower.json b/bower.json index 77e3fb6..e4667d8 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "marker-animate-unobtrusive", "main": "SlidingMarker.js", - "version": "0.2.2", + "version": "0.2.3", "description": "Unobtrusive Google Maps animated marker", "homepage": "https://github.com/terikon/marker-animate-unobtrusive", diff --git a/dist/MarkerWithGhost.min.js b/dist/MarkerWithGhost.min.js index e5fa64a..f682dfd 100644 --- a/dist/MarkerWithGhost.min.js +++ b/dist/MarkerWithGhost.min.js @@ -1,4 +1,4 @@ -/* MarkerWithGhost v0.2.2 11-05-2015 (C) 2015 Terikon Software */ +/* MarkerWithGhost v0.2.3 29-05-2015 (C) 2015 Terikon Software */ -!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery","SlidingMarker"],b.bind(null,a)):"undefined"!=typeof module&&null!==module&&null!=module.exports?module.exports.MarkerWithGhost=b(a,require("jquery"),require("SlidingMarker")):a.MarkerWithGhost=b(a,a.jQuery,a.SlidingMarker)}(this,function(a,b,c){"use strict";b=b||{},b.extend=b.extend||function f(a){return Array.prototype.slice.call(arguments,1).forEach(function(b){if(b)for(var c in b)b[c]&&b[c].constructor===Object?a[c]&&a[c].constructor!==Object?a[c]=b[c]:(a[c]=a[c]||{},f(a[c],b[c])):a[c]=b[c]}),a};var d=function(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a},e=function(a){this.ghostPosition=null,this.ghostAnimationPosition=null,c.call(this,a),this.bindTo("ghostPosition",this,"position"),this.bindTo("ghostAnimationPosition",this._instance,"position")};return d(e,c),b.extend(e.prototype,{_isGhost:!1,set:function(a,b){if("position"===a)this._turnGhostModeOff();else if("ghostPosition"===a)return this._turnGhostModeOn(),this.originalSet("ghostPosition",b),void c.prototype._setInstancePositionAnimated.call(this,b);c.prototype.set.apply(this,arguments)},_rebindEventListener:null,_turnGhostModeOn:function(){this._isGhost||(this._rebindEventListener||(google.maps.event.removeListener(this._rebindEventListener),this._rebindEventListener=null),this.unbind("animationPosition"),this.unbind("ghostPosition"),this._isGhost=!0)},_turnGhostModeOff:function(){var a=this;this._isGhost&&(this._rebindEventListener=google.maps.event.addListener(this._instance,"position_changed",function(){a.getPosition()===a._instance.getPosition()&&(a.bindTo("animationPosition",a._instance,"position"),google.maps.event.removeListener(a._rebindEventListener),a._rebindEventListener=null)}),this.bindTo("ghostPosition",this,"position"),this._isGhost=!1)},getGhostPosition:function(){return this.get("ghostPosition")},setGhostPosition:function(a){this.set("ghostPosition",a)},getGhostAnimationPosition:function(){return this.get("ghostAnimationPosition")},position_changed:function(){this._turnGhostModeOff(),c.prototype.position_changed.apply(this,arguments)}}),e.initializeGlobally=function(){google.maps.Marker=e},e}); +!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery","SlidingMarker"],b.bind(null,a)):"undefined"!=typeof module&&null!==module&&null!=module.exports?module.exports=b(window,require("jquery"),require("SlidingMarker")):a.MarkerWithGhost=b(a,a.jQuery,a.SlidingMarker)}(this,function(a,b,c){"use strict";var d=a.google;b=b||{},b.extend=b.extend||function g(a){return Array.prototype.slice.call(arguments,1).forEach(function(b){if(b)for(var c in b)b[c]&&b[c].constructor===Object?a[c]&&a[c].constructor!==Object?a[c]=b[c]:(a[c]=a[c]||{},g(a[c],b[c])):a[c]=b[c]}),a};var e=function(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a},f=function(a){this.ghostPosition=null,this.ghostAnimationPosition=null,c.call(this,a),this.bindTo("ghostPosition",this,"position"),this.bindTo("ghostAnimationPosition",this._instance,"position")};return e(f,c),b.extend(f.prototype,{_isGhost:!1,set:function(a,b){if("position"===a)this._turnGhostModeOff();else if("ghostPosition"===a)return this._turnGhostModeOn(),this.originalSet("ghostPosition",b),void c.prototype._setInstancePositionAnimated.call(this,b);c.prototype.set.apply(this,arguments)},_rebindEventListener:null,_turnGhostModeOn:function(){this._isGhost||(this._rebindEventListener||(d.maps.event.removeListener(this._rebindEventListener),this._rebindEventListener=null),this.unbind("animationPosition"),this.unbind("ghostPosition"),this._isGhost=!0)},_turnGhostModeOff:function(){var a=this;this._isGhost&&(this._rebindEventListener=d.maps.event.addListener(this._instance,"position_changed",function(){a.getPosition()===a._instance.getPosition()&&(a.bindTo("animationPosition",a._instance,"position"),d.maps.event.removeListener(a._rebindEventListener),a._rebindEventListener=null)}),this.bindTo("ghostPosition",this,"position"),this._isGhost=!1)},getGhostPosition:function(){return this.get("ghostPosition")},setGhostPosition:function(a){this.set("ghostPosition",a)},getGhostAnimationPosition:function(){return this.get("ghostAnimationPosition")},position_changed:function(){this._turnGhostModeOff(),c.prototype.position_changed.apply(this,arguments)}}),f.initializeGlobally=function(){d.maps.Marker=f},f}); //# sourceMappingURL=MarkerWithGhost.min.js.map \ No newline at end of file diff --git a/dist/MarkerWithGhost.min.js.map b/dist/MarkerWithGhost.min.js.map index 4856ae6..a0320bc 100644 --- a/dist/MarkerWithGhost.min.js.map +++ b/dist/MarkerWithGhost.min.js.map @@ -1 +1 @@ -{"version":3,"file":"MarkerWithGhost.min.js","sources":["../MarkerWithGhost.js"],"names":["root","factory","define","amd","bind","module","exports","MarkerWithGhost","require","jQuery","SlidingMarker","this","$","extend","obj","Array","prototype","slice","call","arguments","forEach","source","prop","constructor","Object","inherits","childCtor","parentCtor","TempCtor","superClass_","opt_options","ghostPosition","ghostAnimationPosition","bindTo","_instance","_isGhost","set","key","value","_turnGhostModeOff","_turnGhostModeOn","originalSet","_setInstancePositionAnimated","apply","_rebindEventListener","google","maps","event","removeListener","unbind","that","addListener","getPosition","getGhostPosition","get","setGhostPosition","getGhostAnimationPosition","position_changed","initializeGlobally","Marker"],"mappings":";;CAEC,SAAUA,EAAMC,GACb,YACsB,mBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,SAAU,iBAAkBD,EAAQG,KAAK,KAAMJ,IAC9B,mBAAXK,SAAqC,OAAXA,QAAqC,MAAlBA,OAAOC,QAElED,OAAOC,QAAQC,gBAAkBN,EAAQD,EAAMQ,QAAQ,UAAWA,QAAQ,kBAG1ER,EAAKO,gBAAkBN,EAAQD,EAAMA,EAAKS,OAAQT,EAAKU,gBAE7DC,KACE,SAAUX,EAAMY,EAAGF,GACf,YAGAE,GAAIA,MACJA,EAAEC,OAASD,EAAEC,QAAU,QAASA,GAAOC,GAkBnC,MAhBAC,OAAMC,UAAUC,MAAMC,KAAKC,UAAW,GAAGC,QAA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qBAAuBC,OAAOC,KAAKC,MAAMI,YAAYxC,KAAKuB,UAAW,mBAAoB,WACtFgB,EAAKE,gBAAkBF,EAAKhB,UAAUkB,gBAEtCF,EAAKjB,OAAO,oBAAqBiB,EAAKhB,UAAW,YAEjDW,OAAOC,KAAKC,MAAMC,eAAeE,EAAKN,sBACtCM,EAAKN,qBAAuB,QAIpCjC,KAAKsB,OAAO,gBAAiBtB,KAAM,YAEnCA,KAAKwB,UAAW,IAIxBkB,iBAAkB,WACd,MAAO1C,MAAK2C,IAAI,kBAGpBC,iBAAkB,SAAUxB,GACxBpB,KAAKyB,IAAI,gBAAiBL,IAG9ByB,0BAA2B,WACvB,MAAO7C,MAAK2C,IAAI,2BAIpBG,iBAAkB,WACd9C,KAAK4B,oBACL7B,EAAcM,UAAUyC,iBAAiBd,MAAMhC,KAAMQ,cAK7DZ,EAAgBmD,mBAAqB,WACjCb,OAAOC,KAAKa,OAASpD,GAGlBA"} \ No newline at end of file +{"version":3,"file":"MarkerWithGhost.min.js","sources":["../MarkerWithGhost.js"],"names":["root","factory","define","amd","bind","module","exports","window","require","MarkerWithGhost","jQuery","SlidingMarker","this","$","google","extend","obj","Array","prototype","slice","call","arguments","forEach","source","prop","constructor","Object","inherits","childCtor","parentCtor","TempCtor","superClass_","opt_options","ghostPosition","ghostAnimationPosition","bindTo","_instance","_isGhost","set","key","value","_turnGhostModeOff","_turnGhostModeOn","originalSet","_setInstancePositionAnimated","apply","_rebindEventListener","maps","event","removeListener","unbind","that","addListener","getPosition","getGhostPosition","get","setGhostPosition","getGhostAnimationPosition","position_changed","initializeGlobally","Marker"],"mappings":";;CAEC,SAAUA,EAAMC,GACb,YACsB,mBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,SAAU,iBAAkBD,EAAQG,KAAK,KAAMJ,IAC9B,mBAAXK,SAAqC,OAAXA,QAAqC,MAAlBA,OAAOC,QAElED,OAAOC,QAAUL,EAAQM,OAAQC,QAAQ,UAAWA,QAAQ,kBAG5DR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WACT9B,KAAKyB,WAEDzB,KAAKkC,uBACNhC,EAAOiC,KAAKC,MAAMC,eAAerC,KAAKkC,sBACtClC,KAAKkC,qBAAuB,MAGhClC,KAAKsC,OAAO,qBACZtC,KAAKsC,OAAO,iBAEZtC,KAAKyB,UAAW,IAIxBI,kBAAmB,WACf,GAAIU,GAAOvC,IAEPA,MAAKyB,WAGLzB,KAAKkC,qBAAuBhC,EAAOiC,KAAKC,MAAMI,YAAYxC,KAAKwB,UAAW,mBAAoB,WACtFe,EAAKE,gBAAkBF,EAAKf,UAAUiB,gBAEtCF,EAAKhB,OAAO,oBAAqBgB,EAAKf,UAAW,YAEjDtB,EAAOiC,KAAKC,MAAMC,eAAeE,EAAKL,sBACtCK,EAAKL,qBAAuB,QAIpClC,KAAKuB,OAAO,gBAAiBvB,KAAM,YAEnCA,KAAKyB,UAAW,IAIxBiB,iBAAkB,WACd,MAAO1C,MAAK2C,IAAI,kBAGpBC,iBAAkB,SAAUvB,GACxBrB,KAAK0B,IAAI,gBAAiBL,IAG9BwB,0BAA2B,WACvB,MAAO7C,MAAK2C,IAAI,2BAIpBG,iBAAkB,WACd9C,KAAK6B,oBACL9B,EAAcO,UAAUwC,iBAAiBb,MAAMjC,KAAMS,cAK7DZ,EAAgBkD,mBAAqB,WACjC7C,EAAOiC,KAAKa,OAASnD,GAGlBA"} \ No newline at end of file diff --git a/dist/SlidingMarker.min.js b/dist/SlidingMarker.min.js index 07a72c9..cfca0cd 100644 --- a/dist/SlidingMarker.min.js +++ b/dist/SlidingMarker.min.js @@ -1,4 +1,4 @@ -/* SlidingMarker v0.2.2 11-05-2015 (C) 2015 Terikon Software */ +/* SlidingMarker v0.2.3 29-05-2015 (C) 2015 Terikon Software */ -!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery","markerAnimate"],b.bind(null,a)):"undefined"!=typeof module&&null!==module&&null!=module.exports?module.exports.SlidingMarker=b(a,require("jquery")):a.SlidingMarker=b(a,a.jQuery)}(this,function(a,b){"use strict";b=b||{},b.extend=b.extend||function k(a){return Array.prototype.slice.call(arguments,1).forEach(function(b){if(b)for(var c in b)b[c]&&b[c].constructor===Object?a[c]&&a[c].constructor!==Object?a[c]=b[c]:(a[c]=a[c]||{},k(a[c],b[c])):a[c]=b[c]}),a};var c=google.maps.Marker,d={easing:"easeInOutQuint",duration:1e3,animateFunctionAdapter:function(a,b,c,d){google.maps.Marker.prototype.animateTo.call(a,b,{easing:c,duration:d,complete:function(){}})}},e=function(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a},f=function(a,c){e(a,c);var d=c.prototype;b.extend(a.prototype,{_instance:null,originalSet:function(){return d.set.apply(this,arguments)},set:function(a,b){var c=this;c.originalSet.apply(c,arguments),"position"===a&&c instanceof j?c._setInstancePositionAnimated(b):c.originalSet.apply(c._instance,arguments)},_setInstancePositionAnimated:function(a){var b=this;if(!b._constructing)return a&&b._instance.getPosition()?void b.get("animateFunctionAdapter").call(null,b._instance,a,b.get("easing"),b.get("duration")):void(b._instance.getPosition()!==a&&b._instance.setPosition(a))},originalAddListener:function(){return d.addListener.apply(this,arguments)},addListener:function(a){var b="map_changed"===a?this._instance:g.call(this,a);return this.originalAddListener.apply(b,arguments)},map_changed:function(){},position_changed:function(){this._setInstancePositionAnimated(this.getPosition())}})},g=function(a){return a.endsWith("_changed")?this:this._instance},h=google.maps.event.addListener;google.maps.event.addListener=function(a,b,c){if(a instanceof j){var d="map_changed"===b?a._instance:g.call(a,b);return h.call(this,d,b,c)}return h.apply(this,arguments)};var i=google.maps.event.trigger;google.maps.event.trigger=function(a,b){if(a instanceof j){var c="map_changed"===b?a:g.call(a,b),d=[c].concat(Array.prototype.slice.call(arguments,1));return i.apply(this,d)}return i.apply(this,arguments)},String.prototype.endsWith=String.prototype.endsWith||function(a){return-1!==this.indexOf(a,this.length-a.length)};var j=function(a){a=b.extend({},d,a),this._instance=new c(a),this.animationPosition=null,this._constructing=!0,c.call(this,a),delete this._constructing,this.bindTo("animationPosition",this._instance,"position"),this.bindTo("anchorPoint",this._instance,"anchorPoint"),this.bindTo("internalPosition",this._instance,"internalPosition")};return f(j,c),b.extend(j.prototype,{getAnimationPosition:function(){return this.get("animationPosition")},setPositionNotAnimated:function(a){this.originalSet("position",a)},setDuration:function(a){this.set("duration",a)},getDuration:function(){return this.get("duration")},setEasing:function(a){this.set("easing",a)},getEasing:function(){return this.get("easing")}}),j.initializeGlobally=function(){google.maps.Marker=j},j}); +!function(a,b){"use strict";"function"==typeof define&&define.amd?define(["jquery","markerAnimate"],b.bind(null,a)):"undefined"!=typeof module&&null!==module&&null!=module.exports?module.exports=b(window,require("jquery")):a.SlidingMarker=b(a,a.jQuery)}(this,function(a,b){"use strict";var c=a.google;b=b||{},b.extend=b.extend||function l(a){return Array.prototype.slice.call(arguments,1).forEach(function(b){if(b)for(var c in b)b[c]&&b[c].constructor===Object?a[c]&&a[c].constructor!==Object?a[c]=b[c]:(a[c]=a[c]||{},l(a[c],b[c])):a[c]=b[c]}),a};var d=c.maps.Marker,e={easing:"easeInOutQuint",duration:1e3,animateFunctionAdapter:function(a,b,d,e){c.maps.Marker.prototype.animateTo.call(a,b,{easing:d,duration:e,complete:function(){}})}},f=function(a,b){function c(){}c.prototype=b.prototype,a.superClass_=b.prototype,a.prototype=new c,a.prototype.constructor=a},g=function(a,c){f(a,c);var d=c.prototype;b.extend(a.prototype,{_instance:null,originalSet:function(){return d.set.apply(this,arguments)},set:function(a,b){var c=this;c.originalSet.apply(c,arguments),"position"===a&&c instanceof k?c._setInstancePositionAnimated(b):c.originalSet.apply(c._instance,arguments)},_setInstancePositionAnimated:function(a){var b=this;if(!b._constructing)return a&&b._instance.getPosition()?void b.get("animateFunctionAdapter").call(null,b._instance,a,b.get("easing"),b.get("duration")):void(b._instance.getPosition()!==a&&b._instance.setPosition(a))},originalAddListener:function(){return d.addListener.apply(this,arguments)},addListener:function(a){var b="map_changed"===a?this._instance:h.call(this,a);return this.originalAddListener.apply(b,arguments)},map_changed:function(){},position_changed:function(){this._setInstancePositionAnimated(this.getPosition())}})},h=function(a){return a.endsWith("_changed")?this:this._instance},i=c.maps.event.addListener;c.maps.event.addListener=function(a,b,c){if(a instanceof k){var d="map_changed"===b?a._instance:h.call(a,b);return i.call(this,d,b,c)}return i.apply(this,arguments)};var j=c.maps.event.trigger;c.maps.event.trigger=function(a,b){if(a instanceof k){var c="map_changed"===b?a:h.call(a,b),d=[c].concat(Array.prototype.slice.call(arguments,1));return j.apply(this,d)}return j.apply(this,arguments)},String.prototype.endsWith=String.prototype.endsWith||function(a){return-1!==this.indexOf(a,this.length-a.length)};var k=function(a){a=b.extend({},e,a),this._instance=new d(a),this.animationPosition=null,this._constructing=!0,d.call(this,a),delete this._constructing,this.bindTo("animationPosition",this._instance,"position"),this.bindTo("anchorPoint",this._instance,"anchorPoint"),this.bindTo("internalPosition",this._instance,"internalPosition")};return g(k,d),b.extend(k.prototype,{getAnimationPosition:function(){return this.get("animationPosition")},setPositionNotAnimated:function(a){this.originalSet("position",a)},setDuration:function(a){this.set("duration",a)},getDuration:function(){return this.get("duration")},setEasing:function(a){this.set("easing",a)},getEasing:function(){return this.get("easing")}}),k.initializeGlobally=function(){c.maps.Marker=k},k}); //# sourceMappingURL=SlidingMarker.min.js.map \ No newline at end of file diff --git a/dist/SlidingMarker.min.js.map b/dist/SlidingMarker.min.js.map index 3570f65..b7a3a3b 100644 --- a/dist/SlidingMarker.min.js.map +++ b/dist/SlidingMarker.min.js.map @@ -1 +1 @@ -{"version":3,"file":"SlidingMarker.min.js","sources":["../SlidingMarker.js"],"names":["root","factory","define","amd","bind","module","exports","SlidingMarker","require","jQuery","this","$","extend","obj","Array","prototype","slice","call","arguments","forEach","source","prop","constructor","Object","GoogleMarker","google","maps","Marker","defaultOptions","easing","duration","animateFunctionAdapter","marker","destPosition","animateTo","complete","inherits","childCtor","parentCtor","TempCtor","superClass_","decorates","parentPrototype","_instance","originalSet","set","apply","key","value","that","_setInstancePositionAnimated","position","_constructing","getPosition","get","setPosition","originalAddListener","addListener","eventName","target","getEventTarget","map_changed","position_changed","endsWith","event","instance","handler","originalTrigger","trigger","newArgs","concat","String","suffix","indexOf","length","opt_options","animationPosition","bindTo","getAnimationPosition","setPositionNotAnimated","setDuration","getDuration","setEasing","getEasing","initializeGlobally"],"mappings":";;CAEC,SAAUA,EAAMC,GACb,YACsB,mBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,SAAU,iBAAkBD,EAAQG,KAAK,KAAMJ,IAC9B,mBAAXK,SAAqC,OAAXA,QAAqC,MAAlBA,OAAOC,QAElED,OAAOC,QAAQC,cAAgBN,EAAQD,EAAMQ,QAAQ,WAGrDR,EAAKO,cAAgBN,EAAQD,EAAMA,EAAKS,SAE9CC,KACE,SAAUV,EAAMW,GACZ,YAGAA,GAAIA,MACJA,EAAEC,OAASD,EAAEC,QAAU,QAASA,GAAOC,GAkBnC,MAhBAC,OAAMC,UAAUC,MAAMC,KAAKC,UAAW,GAAGC,QAAQ,SAAUC,GACvD,GAAIA,EACA,IAAK,GAAIC,KAAQD,GACTA,EAAOC,IAASD,EAAOC,GAAMC,cAAgBC,OACxCV,EAAIQ,IAASR,EAAIQ,GAAMC,cAAgBC,OAIxCV,EAAIQ,GAAQD,EAAOC,IAHnBR,EAAIQ,GAAQR,EAAIQ,OAChBT,EAAOC,EAAIQ,GAAOD,EAAOC,KAK7BR,EAAIQ,GAAQD,EAAOC,KAK5BR,EAGX,IAAIW,GAAeC,OAAOC,KAAKC,OAG3BC,GACAC,OAAQ,iBACRC,SAAU,IACVC,uBAAwB,SAAUC,EAAQC,EAAcJ,EAAQC,GAC5DL,OAAOC,KAAKC,OAAOZ,UAAUmB,UAAUjB,KAAKe,EAAQC,GAChDJ,OAAQA,EACRC,SAAUA,EACVK,SAAU,iBAMlBC,EAAW,SAAUC,EAAWC,GAEhC,QAASC,MAETA,EAASxB,UAAYuB,EAAWvB,UAChCsB,EAAUG,YAAcF,EAAWvB,UACnCsB,EA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pB4B,UAAW,SAAUlC,GACjBtC,KAAKmC,IAAI,SAAUG,IAGvBmC,UAAW,WACP,MAAOzE,MAAK4C,IAAI,aAKxB/C,EAAc6E,mBAAqB,WAC/B3D,OAAOC,KAAKC,OAASpB,GAGlBA"} \ No newline at end of file +{"version":3,"file":"SlidingMarker.min.js","sources":["../SlidingMarker.js"],"names":["root","factory","define","amd","bind","module","exports","window","require","SlidingMarker","jQuery","this","$","google","extend","obj","Array","prototype","slice","call","arguments","forEach","source","prop","constructor","Object","GoogleMarker","maps","Marker","defaultOptions","easing","duration","animateFunctionAdapter","marker","destPosition","animateTo","complete","inherits","childCtor","parentCtor","TempCtor","superClass_","decorates","parentPrototype","_instance","originalSet","set","apply","key","value","that","_setInstancePositionAnimated","position","_constructing","getPosition","get","setPosition","originalAddListener","addListener","eventName","target","getEventTarget","map_changed","position_changed","endsWith","event","instance","handler","originalTrigger","trigger","newArgs","concat","String","suffix","indexOf","length","opt_options","animationPosition","bindTo","getAnimationPosition","setPositionNotAnimated","setDuration","getDuration","setEasing","getEasing","initializeGlobally"],"mappings":";;CAEC,SAAUA,EAAMC,GACb,YACsB,mBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,SAAU,iBAAkBD,EAAQG,KAAK,KAAMJ,IAC9B,mBAAXK,SAAqC,OAAXA,QAAqC,MAAlBA,OAAOC,QAElED,OAAOC,QAAUL,EAAQM,OAAQC,QAAQ,WAGzCR,EAAKS,cAAgBR,EAAQD,EAAMA,EAAKU,SAE9CC,KACE,SAAUX,EAAMY,GACZ,YAEA,IAAIC,GAASb,EAAKa,MAGlBD,GAAIA,MACJA,EAAEE,OAASF,EAAEE,QAAU,QAASA,GAAOC,GAkBnC,MAhBAC,OAAMC,UAAUC,MAAMC,KAAKC,UAAW,GAAGC,QAAQ,SAAUC,GACvD,GAAIA,EACA,IAAK,GAAIC,KAAQD,GACTA,EAAOC,IAASD,EAAOC,GAAMC,cAAgBC,OACxCV,EAAIQ,IAASR,EAAIQ,GAA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E,KAAK0C,eAAgB,EAErB3B,EAAaP,KAAKR,KAAMiE,SACjBjE,MAAK0C,cAEZ1C,KAAKmE,OAAO,oBAAqBnE,KAAKiC,UAAW,YACjDjC,KAAKmE,OAAO,cAAenE,KAAKiC,UAAW,eAC3CjC,KAAKmE,OAAO,mBAAoBnE,KAAKiC,UAAW,oBAwCpD,OApCAF,GAAUjC,EAAeiB,GAGzBd,EAAEE,OAAOL,EAAcQ,WAEnB8D,qBAAsB,WAClB,MAAOpE,MAAK4C,IAAI,sBAIpByB,uBAAwB,SAAU5B,GAC9BzC,KAAKkC,YAAY,WAAYO,IAGjC6B,YAAa,SAAUhC,GACnBtC,KAAKmC,IAAI,WAAYG,IAGzBiC,YAAa,WACT,MAAOvE,MAAK4C,IAAI,aAGpB4B,UAAW,SAAUlC,GACjBtC,KAAKmC,IAAI,SAAUG,IAGvBmC,UAAW,WACP,MAAOzE,MAAK4C,IAAI,aAKxB9C,EAAc4E,mBAAqB,WAC/BxE,EAAOc,KAAKC,OAASnB,GAGlBA"} \ No newline at end of file diff --git a/package.json b/package.json index 50e0013..3f215c4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "marker-animate-unobtrusive", "title": "SlidingMarker", - "version": "0.2.2", + "version": "0.2.3", "description": "Unobtrusive Google Maps animated marker", "main": "SlidingMarker.js",