From 4ae751abdae913fb02b10025ef56a6e90b3b28c7 Mon Sep 17 00:00:00 2001 From: SengitU Date: Thu, 12 Jan 2017 10:53:59 +0300 Subject: [PATCH 1/3] Improved modal drag performance Resolved a bug related drag position --- dist/uxrocket.modal.css | 25 +++++-------------------- dist/uxrocket.modal.js | 15 +++++++++++---- dist/uxrocket.modal.min.css | 4 ++-- dist/uxrocket.modal.min.js | 4 ++-- examples/index.html | 2 +- lib/uxrocket.modal.js | 15 +++++++++++---- 6 files changed, 32 insertions(+), 33 deletions(-) diff --git a/dist/uxrocket.modal.css b/dist/uxrocket.modal.css index 1410646..bf88628 100644 --- a/dist/uxrocket.modal.css +++ b/dist/uxrocket.modal.css @@ -18,9 +18,8 @@ z-index: 10000; top: 50%; left: 50%; - -webkit-transform: translateY(-50%) translateX(-50%); - -ms-transform: translateY(-50%) translateX(-50%); - transform: translateY(-50%) translateX(-50%); + -ms-transform: translateY(-50%) translateX(-50%); + transform: translateY(-50%) translateX(-50%); min-width: 50px; min-height: 50px; padding: 20px; @@ -79,8 +78,7 @@ border: 2px dashed #777; border-radius: 50%; box-sizing: border-box; - -webkit-animation: uxr-modal-loading 2s infinite linear; - animation: uxr-modal-loading 2s infinite linear; + animation: uxr-modal-loading 2s infinite linear; } .uxr-modal-close { @@ -108,24 +106,11 @@ display: none; } -@-webkit-keyframes uxr-modal-loading { - from { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); - } - to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); - } -} - @keyframes uxr-modal-loading { from { - -webkit-transform: rotate(0deg); - transform: rotate(0deg); + transform: rotate(0deg); } to { - -webkit-transform: rotate(360deg); - transform: rotate(360deg); + transform: rotate(360deg); } } diff --git a/dist/uxrocket.modal.js b/dist/uxrocket.modal.js index bc037df..f0f8c64 100644 --- a/dist/uxrocket.modal.js +++ b/dist/uxrocket.modal.js @@ -146,7 +146,8 @@ }; Modal.prototype.bindUIActions = function() { - var _this = this; + var _this = this, + dragTimer; this.$el .on(events.click, function(e) { @@ -193,7 +194,12 @@ $(document) .on(events.mousemove + ' ' + events.touchmove, function(e) { - modal.move.drag(e); + if (dragTimer) { + clearTimeout(dragTimer); + } + dragTimer = setTimeout(function() { + modal.move.drag(e); + }, 100); }).on(events.mouseup + ' ' + events.touchend, function() { modal.move.stop(); }); @@ -544,10 +550,11 @@ } }, drag: function(e) { - var pointer = this.pointer(e); + var pointer = this.pointer(e), + scrollTop = $(window).scrollTop(); if(this.selected) { - this.selected.$content[0].style.top = pointer.y + (this.selected.$content.height() / 2) + 'px'; + this.selected.$content[0].style.top = pointer.y - scrollTop + (this.selected.$content.height() / 2) + 'px'; this.selected.$content[0].style.left = pointer.x + 'px'; } }, diff --git a/dist/uxrocket.modal.min.css b/dist/uxrocket.modal.min.css index 18e38da..7b787c5 100644 --- a/dist/uxrocket.modal.min.css +++ b/dist/uxrocket.modal.min.css @@ -2,6 +2,6 @@ * Modal Plugin * @author Bilal Cinarli (http://bcinarli.com/) * @version 1.6.1 - * @build Wed Nov 02 2016 11:18:17 GMT+0300 (Russia TZ 2 Standard Time) + * @build Wed Jan 04 2017 09:59:32 GMT+0300 (Russia TZ 2 Standard Time) */ -#uxr-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#000;opacity:.4}.uxr-modal-container{position:absolute;z-index:10000;top:50%;left:50%;-webkit-transform:translateY(-50%) translateX(-50%);-ms-transform:translateY(-50%) translateX(-50%);transform:translateY(-50%) translateX(-50%);min-width:50px;min-height:50px;padding:20px;border-radius:3px;background-color:#fff;box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,0.5);transition:all ease .3s}.uxr-modal-drag{position:absolute;top:0;left:0;cursor:move;width:calc(100% - 40px);height:24px;z-index:1}.uxr-modal-loaded-content,.uxr-modal-content{position:relative}.uxr-modal-title{position:absolute;top:5px;left:0;width:calc(100% - 27px);line-height:1.5;z-index:10;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:white;padding-left:10px}.uxr-modal-title ~ .uxr-modal-content{margin-top:20px}.uxr-modal-content{width:100%;max-height:100%}.uxr-modal-loading:after{content:"";position:absolute;top:50%;left:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border:2px dashed #777;border-radius:50%;box-sizing:border-box;-webkit-animation:uxr-modal-loading 2s infinite linear;animation:uxr-modal-loading 2s infinite linear}.uxr-modal-close{position:absolute;top:5px;right:5px;width:20px;height:20px;border-radius:50%;background-color:#ccc;color:#fff;font-family:sans-serif;text-align:center;text-decoration:none;cursor:pointer}.uxr-modal-close:before{content:"X";font-size:.8em;line-height:22px}.uxr-modal-hide{display:none}@-webkit-keyframes uxr-modal-loading{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes uxr-modal-loading{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}} +#uxr-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;z-index:9999;background-color:#000;opacity:.4}.uxr-modal-container{position:absolute;z-index:10000;top:50%;left:50%;-ms-transform:translateY(-50%) translateX(-50%);transform:translateY(-50%) translateX(-50%);min-width:50px;min-height:50px;padding:20px;border-radius:3px;background-color:#fff;box-sizing:border-box;box-shadow:0 0 2px rgba(0,0,0,0.5);transition:all ease .3s}.uxr-modal-drag{position:absolute;top:0;left:0;cursor:move;width:calc(100% - 40px);height:24px;z-index:1}.uxr-modal-loaded-content,.uxr-modal-content{position:relative}.uxr-modal-title{position:absolute;top:5px;left:0;width:calc(100% - 27px);line-height:1.5;z-index:10;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;background:white;padding-left:10px}.uxr-modal-title ~ .uxr-modal-content{margin-top:20px}.uxr-modal-content{width:100%;max-height:100%}.uxr-modal-loading:after{content:"";position:absolute;top:50%;left:50%;width:30px;height:30px;margin:-15px 0 0 -15px;border:2px dashed #777;border-radius:50%;box-sizing:border-box;animation:uxr-modal-loading 2s infinite linear}.uxr-modal-close{position:absolute;top:5px;right:5px;width:20px;height:20px;border-radius:50%;background-color:#ccc;color:#fff;font-family:sans-serif;text-align:center;text-decoration:none;cursor:pointer}.uxr-modal-close:before{content:"X";font-size:.8em;line-height:22px}.uxr-modal-hide{display:none}@keyframes uxr-modal-loading{from{transform:rotate(0deg)}to{transform:rotate(360deg)}} diff --git a/dist/uxrocket.modal.min.js b/dist/uxrocket.modal.min.js index ef2df38..ed81930 100644 --- a/dist/uxrocket.modal.min.js +++ b/dist/uxrocket.modal.min.js @@ -2,6 +2,6 @@ * Modal Plugin * @author Bilal Cinarli (http://bcinarli.com/) * @version 1.6.1 - * @build Wed Nov 02 2016 11:18:18 GMT+0300 (Russia TZ 2 Standard Time) + * @build Wed Jan 04 2017 12:31:04 GMT+0300 (Russia TZ 2 Standard Time) */ -!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports&&"function"==typeof require?jQuery:jQuery)}(function(t){var e,n="uxrModal",o=1,s='
',i='
{{#if title}}

{{title}}

{{/if}}
',a={},l={className:"",href:"",width:"",height:"",maxWidth:"",maxHeight:"",title:"",appendTo:"body",allowMultiple:!1,blockUI:!0,overlayClose:!0,close:!0,iframe:!1,html:!1,fixed:!1,draggable:!1,onReady:!1,onOpen:!1,onStart:!1,onLoad:!1,onClose:!1,onRemove:!1},c={click:"click."+n,wresize:"resize."+n,touchstart:"touchstart."+n,touchmove:"touchmove."+n,touchend:"touchend."+n,mousedown:"mousedown."+n,mousemove:"mousemove."+n,mouseup:"mouseup."+n,open:"uxropen."+n,start:"uxrstart."+n,load:"uxrload."+n,close:"uxrclose."+n,ready:"uxrready."+n,resize:"uxrresize."+n,remove:"uxrremove."+n},h={prefix:"uxr-",rocket:"uxRocket",data:n,name:"modal",classes:{ready:"ready",overlay:"overlay",container:"container",drag:"drag",content:"content",title:"title",loadedContent:"loaded-content",loading:"loading",close:"close",hide:"hide"}},r=new uxrPluginUtils({ns:h}),d=function(e,s,i){this._name=n,this._defaults=l,this._instance=o,this._direct=!1,null===e&&(e=document.createElement("a"),this._direct=!0),this.el=e,this.$el=t(e),this.$content=null,this.options=t.extend(!0,{},l,s,this.$el.data()),this.href=this.options.href||this.$el.attr("href")||!1,this.selector=i,o++,this.init()};d.prototype.init=function(){var t=this.$el.data(h.rocket)||{};t[h.data]={hasWrapper:!1,ready:r.getClassname("ready"),selector:this.selector,options:this.options},this.$el.data(h.rocket,t),this.bindUIActions(),this.$el.addClass(r.getClassname("ready")),this.emitEvent("ready"),this._direct===!0&&this.prepare()},d.prototype.bindUIActions=function(){var e=this;this.$el.on(c.click,function(t){t.preventDefault(),"undefined"==typeof a[e._instance]&&e.prepare()}).on(c.ready,function(){e.onReady()}).on(c.open,function(){e.onOpen()}).on(c.start,function(){e.onStart()}).on(c.load,function(){e.onLoad()}).on(c.close,function(){e.onClose()}).on(c.remove,function(){e.onRemove()}),t("body").on(c.click+" "+c.touchstart,"#uxr-modal-overlay",function(){p.closeFromOverlay()}).on(c.click+" "+c.touchstart,"#uxr-modal-instance-"+e._instance+" ."+r.getClassname("close"),function(t){t.preventDefault(),e.close()}).on(c.mousedown+" "+c.touchstart,"#uxr-modal-instance-"+e._instance+" ."+r.getClassname("drag"),function(t){t.preventDefault(),p.move.start(e,t)}),t(document).on(c.mousemove+" "+c.touchmove,function(t){p.move.drag(t)}).on(c.mouseup+" "+c.touchend,function(){p.move.stop()}),t(window).on(c.wresize,function(){void 0!==a[e._instance]&&e.resize()})},d.prototype.unbindUIActions=function(){this.emitEvent("remove"),this.$el.off("."+n)},d.prototype.prepare=function(){var e={},n=t("#uxr-modal-overlay"),o={id:"uxr-modal-instance-"+this._instance,container:r.getClassname("container"),loading:r.getClassname("loading"),drag:r.getClassname("drag"),hide:r.getClassname("hide"),content:r.getClassname("content"),titleClass:r.getClassname("title"),loadedContent:r.getClassname("loadedContent"),close:r.getClassname("close"),title:!!this.options.title&&this.options.title,draggable:"true"!==this.options.draggable},a=r.render(i,o),l="body";this.emitEvent("start"),"body"!==this.options.appendTo&&(l=0===t(r.escapeSelector(this.options.appendTo)).length?"body":this.options.appendTo),!this.options.allowMultiple&&p.isOnlyInstance()&&p.closeInstance(),this.options.blockUI&&(0===n.length?t(r.escapeSelector(l)).append(s):n.removeClass(r.getClassname("hide"))),null===this.$content?(this.$content=t(a),this.options.fixed&&(e.position="fixed"),""!==this.options.maxWidth&&(e.maxWidth=this.options.maxWidth),""!==this.options.maxHeight&&(e.maxHeight=this.options.maxHeight),Object.keys(e).length>0&&this.$content.css(e),t(r.escapeSelector(l)).append(this.$content)):this.$content.removeClass(r.getClassname("hide")),this.$content.addClass(r.getClassname("loading")).find("."+r.getClassname("loadedContent")).html(""),p.registerInstance(this),this.open()},d.prototype.open=function(){this.emitEvent("open"),this.get()},d.prototype.get=function(){var e,n=this;this.options.iframe?(this.options.width=this.options.width||800,this.options.height=this.options.height||600,e='',this.html=e,n.emitEvent("load")):this.isInpage()?this.href!==!1?(this.$target=t(r.escapeSelector(this.href)),this.$ph=t('
').insertBefore(this.$target),this.html=this.$target,n.emitEvent("load")):(this.html=this.options.html,n.emitEvent("load")):t.get(this.href).done(function(t){n.html=t,setTimeout(function(){n.emitEvent("load")})})},d.prototype.load=function(){var t=this.$content.find("."+r.getClassname("loadedContent"));t.html(""),this.$content.removeClass(r.getClassname("loading")),this.options.close&&this.$content.find("."+r.getClassname("close")).removeClass(r.getClassname("hide")),this.options.allowMultiple&&this.$content.find("."+r.getClassname("drag")).removeClass(r.getClassname("hide")),t.append(this.html),this.resize()},d.prototype.close=function(){p.isOnlyInstance()&&t("#uxr-modal-overlay").addClass(r.getClassname("hide")),this.$content.addClass(r.getClassname("hide")).find("."+r.getClassname("close")).addClass(r.getClassname("hide")),p.close(this),this.$ph&&(this.$ph.replaceWith(this.$target),delete this.$ph,delete this.$target),this._direct&&this.removeContent(),this.emitEvent("close")},d.prototype.resize=function(){var t,e,n,o={},s=this.$content.find("."+r.getClassname("content")),i=this.$content.find("."+r.getClassname("loadedContent"));s.height("auto"),t=this.$content.height(),""!==this.options.width&&(o.width=this.options.width),""!==this.options.height&&(o.height=this.options.height),i.css(o),e=i.css("position","absolute").width(),n=i.height(),i.css("position","relative"),t1},isOnlyInstance:function(){return Object.keys(a).length-1===1},move:{pos:{},selected:!1,previous:!1,start:function(t,e){var n=this.pointer(e);this.selected=t,this.selected.$content.css("zIndex",10001),this.pos.top=n.y-this.selected.$content[0].offsetTop,this.pos.left=n.x-this.selected.$content[0].offsetLeft,this.previous?this.previous.$content.css("zIndex",1e4):this.previous=t},drag:function(t){var e=this.pointer(t);this.selected&&(this.selected.$content[0].style.top=e.y+this.selected.$content.height()/2+"px",this.selected.$content[0].style.left=e.x+"px")},stop:function(){this.selected&&(this.previous=this.selected,this.selected=!1)},pointer:function(t){var e={x:0,y:0};if("touchstart"===t.type||"touchmove"===t.type||"touchend"===t.type||"touchcancel"===t.type){var n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];e.x=n.pageX,e.y=n.pageY}else"mousedown"!==t.type&&"mouseup"!==t.type&&"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type&&"mouseenter"!==t.type&&"mouseleave"!==t.type||(e.x=t.pageX,e.y=t.pageY);return e}}};e=t.fn.modal=t.fn.uxrmodal=t.uxrmodal=function(e){var n=this.selector;return"function"==typeof this?new d(null,e,null):this.each(function(){t.data(this,h.data)||t.data(this,h.data,new d(this,e,n))})},e.remove=function(e){var n=t("undefined"==typeof e?"."+r.getClassname("ready"):e);n.each(function(){t(this).data(h.data).remove()})},e.resize=function(){var t=a.lastInstance;p.hasInstances()&&t.resize()},e.close=function(){var t=a.lastInstance;p.hasInstances()&&t.close()},e.getInstances=function(){return a},e.version="1.6.1",e.settings=l}); \ No newline at end of file +!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t("object"==typeof exports&&"function"==typeof require?jQuery:jQuery)}(function(t){var e,n="uxrModal",o=1,s='
',i='
{{#if title}}

{{title}}

{{/if}}
',a={},l={className:"",href:"",width:"",height:"",maxWidth:"",maxHeight:"",title:"",appendTo:"body",allowMultiple:!1,blockUI:!0,overlayClose:!0,close:!0,iframe:!1,html:!1,fixed:!1,draggable:!1,onReady:!1,onOpen:!1,onStart:!1,onLoad:!1,onClose:!1,onRemove:!1},c={click:"click."+n,wresize:"resize."+n,touchstart:"touchstart."+n,touchmove:"touchmove."+n,touchend:"touchend."+n,mousedown:"mousedown."+n,mousemove:"mousemove."+n,mouseup:"mouseup."+n,open:"uxropen."+n,start:"uxrstart."+n,load:"uxrload."+n,close:"uxrclose."+n,ready:"uxrready."+n,resize:"uxrresize."+n,remove:"uxrremove."+n},h={prefix:"uxr-",rocket:"uxRocket",data:n,name:"modal",classes:{ready:"ready",overlay:"overlay",container:"container",drag:"drag",content:"content",title:"title",loadedContent:"loaded-content",loading:"loading",close:"close",hide:"hide"}},r=new uxrPluginUtils({ns:h}),d=function(e,s,i){this._name=n,this._defaults=l,this._instance=o,this._direct=!1,null===e&&(e=document.createElement("a"),this._direct=!0),this.el=e,this.$el=t(e),this.$content=null,this.options=t.extend(!0,{},l,s,this.$el.data()),this.href=this.options.href||this.$el.attr("href")||!1,this.selector=i,o++,this.init()};d.prototype.init=function(){var t=this.$el.data(h.rocket)||{};t[h.data]={hasWrapper:!1,ready:r.getClassname("ready"),selector:this.selector,options:this.options},this.$el.data(h.rocket,t),this.bindUIActions(),this.$el.addClass(r.getClassname("ready")),this.emitEvent("ready"),this._direct===!0&&this.prepare()},d.prototype.bindUIActions=function(){var e,n=this;this.$el.on(c.click,function(t){t.preventDefault(),"undefined"==typeof a[n._instance]&&n.prepare()}).on(c.ready,function(){n.onReady()}).on(c.open,function(){n.onOpen()}).on(c.start,function(){n.onStart()}).on(c.load,function(){n.onLoad()}).on(c.close,function(){n.onClose()}).on(c.remove,function(){n.onRemove()}),t("body").on(c.click+" "+c.touchstart,"#uxr-modal-overlay",function(){p.closeFromOverlay()}).on(c.click+" "+c.touchstart,"#uxr-modal-instance-"+n._instance+" ."+r.getClassname("close"),function(t){t.preventDefault(),n.close()}).on(c.mousedown+" "+c.touchstart,"#uxr-modal-instance-"+n._instance+" ."+r.getClassname("drag"),function(t){t.preventDefault(),p.move.start(n,t)}),t(document).on(c.mousemove+" "+c.touchmove,function(t){e&&clearTimeout(e),e=setTimeout(function(){p.move.drag(t)},100)}).on(c.mouseup+" "+c.touchend,function(){p.move.stop()}),t(window).on(c.wresize,function(){void 0!==a[n._instance]&&n.resize()})},d.prototype.unbindUIActions=function(){this.emitEvent("remove"),this.$el.off("."+n)},d.prototype.prepare=function(){var e={},n=t("#uxr-modal-overlay"),o={id:"uxr-modal-instance-"+this._instance,container:r.getClassname("container"),loading:r.getClassname("loading"),drag:r.getClassname("drag"),hide:r.getClassname("hide"),content:r.getClassname("content"),titleClass:r.getClassname("title"),loadedContent:r.getClassname("loadedContent"),close:r.getClassname("close"),title:!!this.options.title&&this.options.title,draggable:"true"!==this.options.draggable},a=r.render(i,o),l="body";this.emitEvent("start"),"body"!==this.options.appendTo&&(l=0===t(r.escapeSelector(this.options.appendTo)).length?"body":this.options.appendTo),!this.options.allowMultiple&&p.isOnlyInstance()&&p.closeInstance(),this.options.blockUI&&(0===n.length?t(r.escapeSelector(l)).append(s):n.removeClass(r.getClassname("hide"))),null===this.$content?(this.$content=t(a),this.options.fixed&&(e.position="fixed"),""!==this.options.maxWidth&&(e.maxWidth=this.options.maxWidth),""!==this.options.maxHeight&&(e.maxHeight=this.options.maxHeight),Object.keys(e).length>0&&this.$content.css(e),t(r.escapeSelector(l)).append(this.$content)):this.$content.removeClass(r.getClassname("hide")),this.$content.addClass(r.getClassname("loading")).find("."+r.getClassname("loadedContent")).html(""),p.registerInstance(this),this.open()},d.prototype.open=function(){this.emitEvent("open"),this.get()},d.prototype.get=function(){var e,n=this;this.options.iframe?(this.options.width=this.options.width||800,this.options.height=this.options.height||600,e='',this.html=e,n.emitEvent("load")):this.isInpage()?this.href!==!1?(this.$target=t(r.escapeSelector(this.href)),this.$ph=t('
').insertBefore(this.$target),this.html=this.$target,n.emitEvent("load")):(this.html=this.options.html,n.emitEvent("load")):t.get(this.href).done(function(t){n.html=t,setTimeout(function(){n.emitEvent("load")})})},d.prototype.load=function(){var t=this.$content.find("."+r.getClassname("loadedContent"));t.html(""),this.$content.removeClass(r.getClassname("loading")),this.options.close&&this.$content.find("."+r.getClassname("close")).removeClass(r.getClassname("hide")),this.options.allowMultiple&&this.$content.find("."+r.getClassname("drag")).removeClass(r.getClassname("hide")),t.append(this.html),this.resize()},d.prototype.close=function(){p.isOnlyInstance()&&t("#uxr-modal-overlay").addClass(r.getClassname("hide")),this.$content.addClass(r.getClassname("hide")).find("."+r.getClassname("close")).addClass(r.getClassname("hide")),p.close(this),this.$ph&&(this.$ph.replaceWith(this.$target),delete this.$ph,delete this.$target),this._direct&&this.removeContent(),this.emitEvent("close")},d.prototype.resize=function(){var t,e,n,o={},s=this.$content.find("."+r.getClassname("content")),i=this.$content.find("."+r.getClassname("loadedContent"));s.height("auto"),t=this.$content.height(),""!==this.options.width&&(o.width=this.options.width),""!==this.options.height&&(o.height=this.options.height),i.css(o),e=i.css("position","absolute").width(),n=i.height(),i.css("position","relative"),t1},isOnlyInstance:function(){return Object.keys(a).length-1===1},move:{pos:{},selected:!1,previous:!1,start:function(t,e){var n=this.pointer(e);this.selected=t,this.selected.$content.css("zIndex",10001),this.pos.top=n.y-this.selected.$content[0].offsetTop,this.pos.left=n.x-this.selected.$content[0].offsetLeft,this.previous?this.previous.$content.css("zIndex",1e4):this.previous=t},drag:function(e){var n=this.pointer(e),o=t(window).scrollTop();this.selected&&(this.selected.$content[0].style.top=n.y-o+this.selected.$content.height()/2+"px",this.selected.$content[0].style.left=n.x+"px")},stop:function(){this.selected&&(this.previous=this.selected,this.selected=!1)},pointer:function(t){var e={x:0,y:0};if("touchstart"===t.type||"touchmove"===t.type||"touchend"===t.type||"touchcancel"===t.type){var n=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];e.x=n.pageX,e.y=n.pageY}else"mousedown"!==t.type&&"mouseup"!==t.type&&"mousemove"!==t.type&&"mouseover"!==t.type&&"mouseout"!==t.type&&"mouseenter"!==t.type&&"mouseleave"!==t.type||(e.x=t.pageX,e.y=t.pageY);return e}}};e=t.fn.modal=t.fn.uxrmodal=t.uxrmodal=function(e){var n=this.selector;return"function"==typeof this?new d(null,e,null):this.each(function(){t.data(this,h.data)||t.data(this,h.data,new d(this,e,n))})},e.remove=function(e){var n=t("undefined"==typeof e?"."+r.getClassname("ready"):e);n.each(function(){t(this).data(h.data).remove()})},e.resize=function(){var t=a.lastInstance;p.hasInstances()&&t.resize()},e.close=function(){var t=a.lastInstance;p.hasInstances()&&t.close()},e.getInstances=function(){return a},e.version="1.6.1",e.settings=l}); \ No newline at end of file diff --git a/examples/index.html b/examples/index.html index 0f79a27..91d3a87 100644 --- a/examples/index.html +++ b/examples/index.html @@ -98,7 +98,7 @@ (console'da tetiklenen callbackleri görebilirsiniz).

-