Small jQuery plugin for resizing panels
Still doesn't save the size, since we want to save this in the user. Which is not implemented yet.
This commit is contained in:
2
attract/static/assets/js/vendor/jquery-resizable.min.js
vendored
Normal file
2
attract/static/assets/js/vendor/jquery-resizable.min.js
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
!function(n,t){function e(t,e){return">"===t.trim()[0]?(t=t.trim().replace(/^>\s*/,""),e.find(t)):t?n(t):e}n.fn.resizable||(n.fn.resizable=function(t){var o={handleSelector:null,resizeWidth:!0,resizeHeight:!0,resizeWidthFrom:"right",resizeHeightFrom:"bottom",onDragStart:null,onDragEnd:null,onDrag:null,touchActionNone:!0};return"object"==typeof t&&(o=n.extend(o,t)),this.each(function(){function t(n){n.stopPropagation(),n.preventDefault()}function i(e){c=s(e),c.width=parseInt(d.width(),10),c.height=parseInt(d.height(),10),a=d.css("transition"),d.css("transition","none"),o.onDragStart&&o.onDragStart(e,d,o)===!1||(o.dragFunc=r,n(document).bind("mousemove.rsz",o.dragFunc),n(document).bind("mouseup.rsz",u),(window.Touch||navigator.maxTouchPoints)&&(n(document).bind("touchmove.rsz",o.dragFunc),n(document).bind("touchend.rsz",u)),n(document).bind("selectstart.rsz",t))}function r(n){var t,e,i=s(n);t="left"===o.resizeWidthFrom?c.width-i.x+c.x:c.width+i.x-c.x,e="top"===o.resizeHeightFrom?c.height-i.y+c.y:c.height+i.y-c.y,o.onDrag&&o.onDrag(n,d,t,e,o)===!1||(o.resizeHeight&&d.height(e),o.resizeWidth&&d.width(t))}function u(e){return e.stopPropagation(),e.preventDefault(),n(document).unbind("mousemove.rsz",o.dragFunc),n(document).unbind("mouseup.rsz",u),(window.Touch||navigator.maxTouchPoints)&&(n(document).unbind("touchmove.rsz",o.dragFunc),n(document).unbind("touchend.rsz",u)),n(document).unbind("selectstart.rsz",t),d.css("transition",a),o.onDragEnd&&o.onDragEnd(e,d,o),!1}function s(n){var t={x:0,y:0,width:0,height:0};if("number"==typeof n.clientX)t.x=n.clientX,t.y=n.clientY;else{if(!n.originalEvent.touches)return null;t.x=n.originalEvent.touches[0].clientX,t.y=n.originalEvent.touches[0].clientY}return t}var c,a,d=n(this),h=e(o.handleSelector,d);o.touchActionNone&&h.css("touch-action","none"),d.addClass("resizable"),h.bind("mousedown.rsz touchstart.rsz",i)})})}(jQuery,void 0);
|
||||
//# sourceMappingURL=jquery-resizable.min.js.map
|
Reference in New Issue
Block a user