亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? cropper.uncompressed.js

?? 在線裁切圖片
?? JS
?? 第 1 頁 / 共 4 頁
字號:
/**
 * Image Cropper (v. 1.2.0 - 2006-10-30 )
 * Copyright (c) 2006 David Spurr (http://www.defusion.org.uk/)
 * 
 * The image cropper provides a way to draw a crop area on an image and capture
 * the coordinates of the drawn crop area.
 * 
 * Features include:
 * 		- Based on Prototype and Scriptaculous
 * 		- Image editing package styling, the crop area functions and looks 
 * 		  like those found in popular image editing software
 * 		- Dynamic inclusion of required styles
 * 		- Drag to draw areas
 * 		- Shift drag to draw/resize areas as squares
 * 		- Selection area can be moved 
 * 		- Seleciton area can be resized using resize handles
 * 		- Allows dimension ratio limited crop areas
 * 		- Allows minimum dimension crop areas
 * 		- Allows maximum dimesion crop areas
 * 		- If both min & max dimension options set to the same value for a single axis,then the cropper will not 
 * 		  display the resize handles as appropriate (when min & max dimensions are passed for both axes this
 * 		  results in a 'fixed size' crop area)
 * 		- Allows dynamic preview of resultant crop ( if minimum width & height are provided ), this is
 * 		  implemented as a subclass so can be excluded when not required
 * 		- Movement of selection area by arrow keys ( shift + arrow key will move selection area by
 * 		  10 pixels )
 *		- All operations stay within bounds of image
 * 		- All functionality & display compatible with most popular browsers supported by Prototype:
 * 			PC:	IE 7, 6 & 5.5, Firefox 1.5, Opera 8.5 (see known issues) & 9.0b
 * 			MAC: Camino 1.0, Firefox 1.5, Safari 2.0
 * 
 * Requires:
 * 		- Prototype v. 1.5.0_rc0 > (as packaged with Scriptaculous 1.6.1)
 * 		- Scriptaculous v. 1.6.1 > modules: builder, dragdrop 
 * 		
 * Known issues:
 * 		- Safari animated gifs, only one of each will animate, this seems to be a known Safari issue
 * 
 * 		- After drawing an area and then clicking to start a new drag in IE 5.5 the rendered height 
 *        appears as the last height until the user drags, this appears to be the related to the error 
 *        that the forceReRender() method fixes for IE 6, i.e. IE 5.5 is not redrawing the box properly.
 * 
 * 		- Lack of CSS opacity support in Opera before version 9 mean we disable those style rules, these 
 * 		  could be fixed by using PNGs with transparency if Opera 8.5 support is high priority for you
 * 
 * 		- Marching ants keep reloading in IE <6 (not tested in IE7), it is a known issue in IE and I have 
 *        found no viable workarounds that can be included in the release. If this really is an issue for you
 *        either try this post: http://mir.aculo.us/articles/2005/08/28/internet-explorer-and-ajax-image-caching-woes
 *        or uncomment the 'FIX MARCHING ANTS IN IE' rules in the CSS file
 *		
 *		- Styling & borders on image, any CSS styling applied directly to the image itself (floats, borders, padding, margin, etc.) will 
 *		  cause problems with the cropper. The use of a wrapper element to apply these styles to is recommended.
 * 
 * 		- overflow: auto or overflow: scroll on parent will cause cropper to burst out of parent in IE and Opera (maybe Mac browsers too)
 *		  I'm not sure why yet.
 * 
 * Usage:
 * 		See Cropper.Img & Cropper.ImgWithPreview for usage details
 * 
 * Changelog:
 * v1.2.0 - 2006-10-30
 * 		+ Added id to the preview image element using 'imgCrop_[originalImageID]'
 *      * #00001 - Fixed bug: Doesn't account for scroll offsets
 *      * #00009 - Fixed bug: Placing the cropper inside differently positioned elements causes incorrect co-ordinates and display
 *      * #00013 - Fixed bug: I-bar cursor appears on drag plane
 *      * #00014 - Fixed bug: If ID for image tag is not found in document script throws error
 *      * Fixed bug with drag start co-ordinates if wrapper element has moved in browser (e.g. dragged to a new position)
 *      * Fixed bug with drag start co-ordinates if image contained in a wrapper with scrolling - this may be buggy if image 
 * 		  has other ancestors with scrolling applied (except the body)
 *      * #00015 - Fixed bug: When cropper removed and then reapplied onEndCrop callback gets called multiple times, solution suggestion from Bill Smith
 *      * Various speed increases & code cleanup which meant improved performance in Mac - which allowed removal of different overlay methods for
 *        IE and all other browsers, which led to a fix for:
 * 		* #00010 - Fixed bug: Select area doesn't adhere to image size when image resized using img attributes
 *      - #00006 - Removed default behaviour of automatically setting a ratio when both min width & height passed, the ratioDimensions must be passed in
 * 		+ #00005 - Added ability to set maximum crop dimensions, if both min & max set as the same value then we'll get a fixed cropper size on the axes as appropriate
 *        and the resize handles will not be displayed as appropriate
 * 		* Switched keydown for keypress for moving select area with cursor keys (makes for nicer action) - doesn't appear to work in Safari
 * 
 * v1.1.3 - 2006-08-21
 * 		* Fixed wrong cursor on western handle in CSS
 * 		+ #00008 & #00003 - Added feature: Allow to set dimensions & position for cropper on load
 *      * #00002 - Fixed bug: Pressing 'remove cropper' twice removes image in IE
 * 
 * v1.1.2 - 2006-06-09
 * 		* Fixed bugs with ratios when GCD is low (patch submitted by Andy Skelton)
 * 
 * v1.1.1 - 2006-06-03
 * 		* Fixed bug with rendering issues fix in IE 5.5
 * 		* Fixed bug with endCrop callback issues once cropper had been removed & reset in IE
 * 
 * v1.1.0 - 2006-06-02
 * 		* Fixed bug with IE constantly trying to reload select area background image
 * 		* Applied more robust fix to Safari & IE rendering issues
 * 		+ Added method to reset parameters - useful for when dynamically changing img cropper attached to
 * 		+ Added method to remove cropper from image
 * 
 * v1.0.0 - 2006-05-18 
 * 		+ Initial verison
 * 
 * 
 * Copyright (c) 2006, David Spurr (http://www.defusion.org.uk/)
 * All rights reserved.
 * 
 * 
 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
 * 
 *     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
 *     * Neither the name of the David Spurr nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 * http://www.opensource.org/licenses/bsd-license.php
 * 
 * See scriptaculous.js for full scriptaculous licence
 */
 
/**
 * Extend the Draggable class to allow us to pass the rendering
 * down to the Cropper object.
 */
var CropDraggable = Class.create();

Object.extend( Object.extend( CropDraggable.prototype, Draggable.prototype), {
	
	initialize: function(element) {
		this.options = Object.extend(
			{
				/**
				 * The draw method to defer drawing to
				 */
				drawMethod: function() {}
			}, 
			arguments[1] || {}
		);

		this.element = $(element);

		this.handle = this.element;

		this.delta    = this.currentDelta();
		this.dragging = false;   

		this.eventMouseDown = this.initDrag.bindAsEventListener(this);
		Event.observe(this.handle, "mousedown", this.eventMouseDown);

		Draggables.register(this);
	},
	
	/**
	 * Defers the drawing of the draggable to the supplied method
	 */
	draw: function(point) {
		var pos = Position.cumulativeOffset(this.element);
		var d = this.currentDelta();
		pos[0] -= d[0]; 
		pos[1] -= d[1];
				
		var p = [0,1].map(function(i) { 
			return (point[i]-pos[i]-this.offset[i]) 
		}.bind(this));
				
		this.options.drawMethod( p );
	}
	
});


/**
 * The Cropper object, this will attach itself to the provided image by wrapping it with 
 * the generated xHTML structure required by the cropper.
 * 
 * Usage:
 * 	@param obj Image element to attach to
 * 	@param obj Optional options:
 * 		- ratioDim obj 
 * 			The pixel dimensions to apply as a restrictive ratio, with properties x & y
 * 
 * 		- minWidth int 
 * 			The minimum width for the select area in pixels
 * 
 * 		- minHeight	int 
 * 			The mimimum height for the select area in pixels
 * 
 * 		- maxWidth int
 * 			The maximum width for the select areas in pixels (if both minWidth & maxWidth set to same the width of the cropper will be fixed)
 * 
 * 		- maxHeight int
 *			The maximum height for the select areas in pixels (if both minHeight & maxHeight set to same the height of the cropper will be fixed)
 * 
 * 		- displayOnInit int 
 * 			Whether to display the select area on initialisation, only used when providing minimum width & height or ratio
 * 
 * 		- onEndCrop func
 * 			The callback function to provide the crop details to on end of a crop (see below)
 * 
 * 		- captureKeys boolean
 * 			Whether to capture the keys for moving the select area, as these can cause some problems at the moment
 * 
 * 		- onloadCoords obj
 * 			A coordinates object with properties x1, y1, x2 & y2; for the coordinates of the select area to display onload
 * 	
 *----------------------------------------------
 * 
 * The callback function provided via the onEndCrop option should accept the following parameters:
 * 		- coords obj
 * 			The coordinates object with properties x1, y1, x2 & y2; for the coordinates of the select area
 * 
 * 		- dimensions obj
 * 			The dimensions object with properites width & height; for the dimensions of the select area
 * 		
 *
 * 		Example:
 * 			function onEndCrop( coords, dimensions ) {
 *				$( 'x1' ).value 	= coords.x1;
 *				$( 'y1' ).value 	= coords.y1;
 *				$( 'x2' ).value 	= coords.x2;
 *				$( 'y2' ).value 	= coords.y2;
 *				$( 'width' ).value 	= dimensions.width;
 *				$( 'height' ).value	= dimensions.height;
 *			}
 * 
 */
var Cropper = {};
Cropper.Img = Class.create();
Cropper.Img.prototype = {
	
	/**
	 * Initialises the class
	 * 
	 * @access public
	 * @param obj Image element to attach to
	 * @param obj Options
	 * @return void
	 */
	initialize: function(element, options) {
		this.options = Object.extend(
			{
				/**
				 * @var obj
				 * The pixel dimensions to apply as a restrictive ratio
				 */
				ratioDim: { x: 0, y: 0 },
				/**
				 * @var int
				 * The minimum pixel width, also used as restrictive ratio if min height passed too
				 */
				minWidth:		0,
				/**
				 * @var int
				 * The minimum pixel height, also used as restrictive ratio if min width passed too
				 */
				minHeight:		0,
				/**
				 * @var boolean
				 * Whether to display the select area on initialisation, only used when providing minimum width & height or ratio
				 */
				displayOnInit:	false,
				/**
				 * @var function
				 * The call back function to pass the final values to
				 */
				onEndCrop: Prototype.emptyFunction,
				/**
				 * @var boolean
				 * Whether to capture key presses or not
				 */
				captureKeys: true,
				/**
				 * @var obj Coordinate object x1, y1, x2, y2
				 * The coordinates to optionally display the select area at onload
				 */
				onloadCoords: null,
				/**
				 * @var int
				 * The maximum width for the select areas in pixels (if both minWidth & maxWidth set to same the width of the cropper will be fixed)
				 */
				maxWidth: 0,
				/**
				 * @var int
				 * The maximum height for the select areas in pixels (if both minHeight & maxHeight set to same the height of the cropper will be fixed)
				 */
				maxHeight: 0
			}, 
			options || {}
		);				
		/**
		 * @var obj
		 * The img node to attach to
		 */
		this.img			= $( element );
		/**
		 * @var obj
		 * The x & y coordinates of the click point
		 */
		this.clickCoords	= { x: 0, y: 0 };
		/**
		 * @var boolean
		 * Whether the user is dragging
		 */
		this.dragging		= false;
		/**
		 * @var boolean
		 * Whether the user is resizing
		 */
		this.resizing		= false;
		/**
		 * @var boolean
		 * Whether the user is on a webKit browser
		 */
		this.isWebKit 		= /Konqueror|Safari|KHTML/.test( navigator.userAgent );
		/**
		 * @var boolean
		 * Whether the user is on IE
		 */
		this.isIE 			= /MSIE/.test( navigator.userAgent );
		/**
		 * @var boolean
		 * Whether the user is on Opera below version 9
		 */
		this.isOpera8		= /Opera\s[1-8]/.test( navigator.userAgent );
		/**
		 * @var int
		 * The x ratio 
		 */
		this.ratioX			= 0;
		/**
		 * @var int
		 * The y ratio
		 */
		this.ratioY			= 0;
		/**
		 * @var boolean

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品免费观看| 久久综合久色欧美综合狠狠| 国产福利精品一区| 激情成人综合网| 韩国视频一区二区| 国产在线一区二区| 国产精品 欧美精品| 国内成人免费视频| 国产一区二区三区不卡在线观看 | 成人国产精品免费| 国产白丝精品91爽爽久久| 国产69精品久久久久777| 成人午夜在线免费| 欧美丝袜丝nylons| 欧美一区二区私人影院日本| 色哟哟一区二区| 在线成人av网站| 精品福利av导航| 国产精品美女一区二区| 一区二区视频在线| 日韩成人免费电影| 久久99日本精品| 国产成a人亚洲| 欧美天堂亚洲电影院在线播放| 欧美三级电影在线观看| 精品福利在线导航| 中文字幕第一区综合| 亚洲一区电影777| 欧美a一区二区| 成人精品国产一区二区4080| 91麻豆蜜桃一区二区三区| 欧美亚洲一区二区在线| 精品入口麻豆88视频| 亚洲国产精品二十页| 国产精品日韩成人| 人人狠狠综合久久亚洲| 成人性色生活片| 欧美精品1区2区| 亚洲国产激情av| 日韩av一级电影| 高清在线成人网| eeuss鲁片一区二区三区| 亚洲精品欧美在线| 轻轻草成人在线| 国产伦精一区二区三区| 成人免费观看男女羞羞视频| 欧美日韩另类国产亚洲欧美一级| 一本到一区二区三区| 久久久久久日产精品| 亚洲精品视频在线观看免费| 亚洲午夜电影在线| 成人视屏免费看| 精品日韩一区二区三区| 国产精品免费久久| 强制捆绑调教一区二区| 欧美亚洲禁片免费| 亚洲国产高清不卡| 亚洲高清视频在线| 一本久久a久久精品亚洲| 国产人妖乱国产精品人妖| 午夜精品成人在线视频| 国产精品一二三区在线| 色综合咪咪久久| 国产精品护士白丝一区av| 青青草精品视频| 欧美福利电影网| 首页国产欧美久久| 欧美日韩在线播放| 亚洲精品日韩一| 欧美午夜电影在线播放| 日本一区二区久久| 亚洲风情在线资源站| 久久精品久久99精品久久| 91蝌蚪porny九色| 亚洲精品成人天堂一二三| 亚洲一二三四区| 成人性生交大片免费| 9色porny自拍视频一区二区| 26uuu亚洲| 亚洲一区二区欧美日韩 | 一区二区在线观看免费视频播放 | 一区二区三区日韩欧美精品| 成人高清伦理免费影院在线观看| 337p日本欧洲亚洲大胆精品| 极品少妇xxxx精品少妇| 国产欧美日韩卡一| 丁香天五香天堂综合| 国产日韩精品一区二区浪潮av| 久久精品国产99国产| 国产欧美日韩在线| 国产+成+人+亚洲欧洲自线| 日韩精品影音先锋| 粉嫩蜜臀av国产精品网站| 久久综合成人精品亚洲另类欧美| 国产高清精品在线| 欧美国产欧美综合| 在线视频你懂得一区二区三区| 亚洲综合一二三区| 制服.丝袜.亚洲.另类.中文 | 99久久亚洲一区二区三区青草| 国产欧美日韩一区二区三区在线观看| 国产成人久久精品77777最新版本| 在线成人免费视频| 懂色av中文字幕一区二区三区| 国产精品三级在线观看| 欧美性大战久久久久久久蜜臀| 日韩中文字幕区一区有砖一区| 欧美成人一区二区三区| 麻豆国产欧美日韩综合精品二区| 久久久综合网站| 99国产精品视频免费观看| 日韩精品91亚洲二区在线观看 | 亚洲激情av在线| 欧美一区二区视频网站| 国产成人亚洲综合a∨婷婷| 一区在线中文字幕| 欧美精品一级二级三级| 从欧美一区二区三区| 亚洲第一主播视频| 国产精品欧美极品| 91精品在线免费观看| 成人丝袜18视频在线观看| 青青草97国产精品免费观看无弹窗版| 国产欧美日韩亚州综合| 欧美日韩国产123区| 99久久精品国产毛片| 亚洲二区视频在线| 精品第一国产综合精品aⅴ| 91国模大尺度私拍在线视频| 国产在线不卡视频| 天堂蜜桃91精品| 夜夜嗨av一区二区三区网页| 国产午夜精品美女毛片视频| 国产美女在线精品| 精品日韩一区二区三区免费视频| 成人理论电影网| 国产三级久久久| 日韩一区二区三区视频在线观看| 午夜私人影院久久久久| 中文字幕在线一区| 国产综合色视频| 亚洲一区在线看| 国产成人在线免费| 久久麻豆一区二区| 日韩亚洲国产中文字幕欧美| 不卡区在线中文字幕| 性欧美大战久久久久久久久| 国产精品久线在线观看| 欧美videofree性高清杂交| 欧美精品久久天天躁| av在线不卡网| 色综合天天视频在线观看| 成人视屏免费看| 国产成人综合精品三级| 亚洲午夜激情av| 中文字幕av免费专区久久| 欧美激情自拍偷拍| 日韩欧美一卡二卡| 久久久国际精品| 久久亚洲精品小早川怜子| 久久综合九色综合久久久精品综合| 日韩一区二区三区电影在线观看| 日韩三级视频在线看| 欧美成人精品1314www| 久久综合五月天婷婷伊人| 亚洲精品在线观看网站| 国产女主播在线一区二区| 国产精品区一区二区三区| 国产精品久久看| 一区二区三区免费观看| 亚洲精品高清视频在线观看| 亚洲综合偷拍欧美一区色| 亚洲成a人片在线不卡一二三区| 亚洲国产精品久久艾草纯爱| 强制捆绑调教一区二区| 国产伦精品一区二区三区免费迷| 久久99国产精品麻豆| 国产在线播放一区三区四| 日韩欧美一级二级| 日韩av网站免费在线| 日本色综合中文字幕| 狠狠色综合日日| 国产亚洲女人久久久久毛片| 日韩欧美在线综合网| 欧美在线观看18| 欧美肥大bbwbbw高潮| 日韩一二三四区| 91麻豆精品国产无毒不卡在线观看| 欧美精品高清视频| 国产乱码精品一区二区三区av| 午夜影视日本亚洲欧洲精品| 亚洲国产综合视频在线观看| 午夜精品久久久久久久| 韩国v欧美v亚洲v日本v| 91视频一区二区三区| 欧美日韩亚洲综合一区| 久久青草欧美一区二区三区| 成人精品小蝌蚪| 免费看欧美女人艹b| 国产宾馆实践打屁股91|