From a69b251eef4b8a12717e89b3e0980d2f449190ef Mon Sep 17 00:00:00 2001 From: Lance Gliser Date: Mon, 27 Nov 2017 12:33:40 -0600 Subject: [PATCH] Added the required x-arrow attribute to enable the arrow to stay bound to the target --- dist/js/shepherd.js | 2 +- dist/js/shepherd.min.js | 2 +- src/js/shepherd.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/js/shepherd.js b/dist/js/shepherd.js index 9797b9753..f4845a9ce 100644 --- a/dist/js/shepherd.js +++ b/dist/js/shepherd.js @@ -552,7 +552,7 @@ var Step = (function (_Evented) { this.destroy(); } - this.el = createFromHTML('
'); + this.el = createFromHTML('
'); var content = document.createElement('div'); content.className = 'shepherd-content'; diff --git a/dist/js/shepherd.min.js b/dist/js/shepherd.min.js index 20906ddb7..62e363958 100644 --- a/dist/js/shepherd.min.js +++ b/dist/js/shepherd.min.js @@ -1 +1 @@ -!function(e,t){"function"==typeof define&&define.amd?define(["popper"],t):"object"==typeof exports?module.exports=t(require("popper")):e.Shepherd=t(e.Popper)}(this,function(e){"use strict";function t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i=0;r--){if(0===o){i[t[o]]=n.slice(0,r+1).join(" ");break}i[t[o]]=n[r],o--}return i}var p=function(e,t,n){for(var i=!0;i;){var s=e,o=t,r=n;i=!1,null===s&&(s=Function.prototype);var h=Object.getOwnPropertyDescriptor(s,o);if(void 0!==h){if("value"in h)return h.value;var a=h.get;if(void 0===a)return;return a.call(r)}var c=Object.getPrototypeOf(s);if(null===c)return;e=c,t=o,n=r,i=!0,h=c=void 0}},d=function(){function e(e,t){for(var n=0;n1?t-1:0),i=0,s=1;s
');var t=document.createElement("div");t.className="shepherd-content",this.el.appendChild(t);var n=document.createElement("header");if(t.appendChild(n),this.options.title&&(n.innerHTML+="

"+this.options.title+"

",this.el.className+=" shepherd-has-title"),this.options.showCancelLink){var i=a("");n.appendChild(i),this.el.className+=" shepherd-has-cancel-link",this.bindCancelLink(i)}s(this.options.text)||!function(){var n=a("
"),i=e.options.text;"function"==typeof i&&(i=i.call(e,n)),i instanceof HTMLElement?n.appendChild(i):("string"==typeof i&&(i=[i]),i.map(function(e){n.innerHTML+="

"+e+"

"})),t.appendChild(n)}(),this.options.buttons&&!function(){var n=document.createElement("footer"),i=a("
    ");e.options.buttons.map(function(t){var n=a("
  • "+t.text+"");i.appendChild(n),e.bindButtonEvents(t,n.querySelector("a"))}),n.appendChild(i),t.appendChild(n)}(),document.body.appendChild(this.el),this.setupPopper(),this.options.advanceOn&&this.bindAdvance()}},{key:"bindCancelLink",value:function(e){var t=this;e.addEventListener("click",function(e){e.preventDefault(),t.cancel()})}},{key:"bindButtonEvents",value:function(e,t){var n=this;e.events=e.events||{},s(e.action)||(e.events.click=e.action);for(var i in e.events)if({}.hasOwnProperty.call(e.events,i)){var o=e.events[i];"string"==typeof o&&!function(){var e=o;o=function(){return n.tour.show(e)}}(),t.addEventListener(i,o)}this.on("destroy",function(){for(var n in e.events)if({}.hasOwnProperty.call(e.events,n)){var i=e.events[n];t.removeEventListener(n,i)}})}}]),v}(y),b=function(e){function o(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n(this,o),p(Object.getPrototypeOf(o.prototype),"constructor",this).call(this,t),this.bindMethods(),this.options=t,this.steps=this.options.steps||[];var i=["complete","cancel","hide","start","show","active","inactive"];return i.map(function(t){!function(t){e.on(t,function(n){n=n||{},n.tour=e,m.trigger(t,n)})}(t)}),this}return t(o,e),d(o,[{key:"bindMethods",value:function(){var e=this,t=["next","back","cancel","complete","hide"];t.map(function(t){e[t]=e[t].bind(e)})}},{key:"addStep",value:function(e,t){return s(t)&&(t=e),t instanceof g?t.tour=this:("string"!=typeof e&&"number"!=typeof e||(t.id=e.toString()),t=i({},this.options.defaults,t),t=new g(this,t)),this.steps.push(t),this}},{key:"removeStep",value:function(e){for(var t=this.getCurrentStep(),n=0;n=0;o--){if(0===r){i[t[r]]=n.slice(0,o+1).join(" ");break}i[t[r]]=n[o],r--}return i}var p=function(e,t,n){for(var i=!0;i;){var s=e,r=t,o=n;i=!1,null===s&&(s=Function.prototype);var h=Object.getOwnPropertyDescriptor(s,r);if(void 0!==h){if("value"in h)return h.value;var a=h.get;if(void 0===a)return;return a.call(o)}var c=Object.getPrototypeOf(s);if(null===c)return;e=c,t=r,n=o,i=!0,h=c=void 0}},d=function(){function e(e,t){for(var n=0;n1?t-1:0),i=0,s=1;s
    ');var t=document.createElement("div");t.className="shepherd-content",this.el.appendChild(t);var n=document.createElement("header");if(t.appendChild(n),this.options.title&&(n.innerHTML+="

    "+this.options.title+"

    ",this.el.className+=" shepherd-has-title"),this.options.showCancelLink){var i=a("");n.appendChild(i),this.el.className+=" shepherd-has-cancel-link",this.bindCancelLink(i)}s(this.options.text)||!function(){var n=a("
    "),i=e.options.text;"function"==typeof i&&(i=i.call(e,n)),i instanceof HTMLElement?n.appendChild(i):("string"==typeof i&&(i=[i]),i.map(function(e){n.innerHTML+="

    "+e+"

    "})),t.appendChild(n)}(),this.options.buttons&&!function(){var n=document.createElement("footer"),i=a("
      ");e.options.buttons.map(function(t){var n=a("
    • "+t.text+"");i.appendChild(n),e.bindButtonEvents(t,n.querySelector("a"))}),n.appendChild(i),t.appendChild(n)}(),document.body.appendChild(this.el),this.setupPopper(),this.options.advanceOn&&this.bindAdvance()}},{key:"bindCancelLink",value:function(e){var t=this;e.addEventListener("click",function(e){e.preventDefault(),t.cancel()})}},{key:"bindButtonEvents",value:function(e,t){var n=this;e.events=e.events||{},s(e.action)||(e.events.click=e.action);for(var i in e.events)if({}.hasOwnProperty.call(e.events,i)){var r=e.events[i];"string"==typeof r&&!function(){var e=r;r=function(){return n.tour.show(e)}}(),t.addEventListener(i,r)}this.on("destroy",function(){for(var n in e.events)if({}.hasOwnProperty.call(e.events,n)){var i=e.events[n];t.removeEventListener(n,i)}})}}]),v}(y),b=function(e){function r(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];n(this,r),p(Object.getPrototypeOf(r.prototype),"constructor",this).call(this,t),this.bindMethods(),this.options=t,this.steps=this.options.steps||[];var i=["complete","cancel","hide","start","show","active","inactive"];return i.map(function(t){!function(t){e.on(t,function(n){n=n||{},n.tour=e,m.trigger(t,n)})}(t)}),this}return t(r,e),d(r,[{key:"bindMethods",value:function(){var e=this,t=["next","back","cancel","complete","hide"];t.map(function(t){e[t]=e[t].bind(e)})}},{key:"addStep",value:function(e,t){return s(t)&&(t=e),t instanceof g?t.tour=this:("string"!=typeof e&&"number"!=typeof e||(t.id=e.toString()),t=i({},this.options.defaults,t),t=new g(this,t)),this.steps.push(t),this}},{key:"removeStep",value:function(e){for(var t=this.getCurrentStep(),n=0;n
      `); + this.el = createFromHTML(`
      `); let content = document.createElement('div'); content.className = 'shepherd-content';