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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cropper.uncompressed.js

?? 在線裁切圖片
?? JS
?? 第 1 頁 / 共 4 頁
字號:
					dir.y = 1;
					break;
			}
			
			if( dir.x != 0 || dir.y != 0 ) {
				// if shift is pressed then move by 10 pixels
				if( e.shiftKey ) {
					dir.x *= 10;
					dir.y *= 10;
				}
				
				this.moveArea( [ this.areaCoords.x1 + dir.x, this.areaCoords.y1 + dir.y ] );
				Event.stop( e ); 
			}
		}
	},
	
	/**
	 * Calculates the width from the areaCoords
	 * 
	 * @access private
	 * @return int
	 */
	calcW: function() {
		return (this.areaCoords.x2 - this.areaCoords.x1)
	},
	
	/**
	 * Calculates the height from the areaCoords
	 * 
	 * @access private
	 * @return int
	 */
	calcH: function() {
		return (this.areaCoords.y2 - this.areaCoords.y1)
	},
	
	/**
	 * Moves the select area to the supplied point (assumes the point is x1 & y1 of the select area)
	 * 
	 * @access public
	 * @param array Point for x1 & y1 to move select area to
	 * @return void
	 */
	moveArea: function( point ) {
		// dump( 'moveArea        : ' + point[0] + ',' + point[1] + ',' + ( point[0] + ( this.areaCoords.x2 - this.areaCoords.x1 ) ) + ',' + ( point[1] + ( this.areaCoords.y2 - this.areaCoords.y1 ) ) + '\n' );
		this.setAreaCoords( 
			{
				x1: point[0], 
				y1: point[1],
				x2: point[0] + this.calcW(),
				y2: point[1] + this.calcH()
			},
			true,
			false
		);
		this.drawArea();
	},

	/**
	 * Clones a co-ordinates object, stops problems with handling them by reference
	 * 
	 * @access private
	 * @param obj Coordinate object x1, y1, x2, y2
	 * @return obj Coordinate object x1, y1, x2, y2
	 */
	cloneCoords: function( coords ) {
		return { x1: coords.x1, y1: coords.y1, x2: coords.x2, y2: coords.y2 };
	},

	/**
	 * Sets the select coords to those provided but ensures they don't go
	 * outside the bounding box
	 * 
	 * @access private
	 * @param obj Coordinates x1, y1, x2, y2
	 * @param boolean Whether this is a move
	 * @param boolean Whether to apply squaring
	 * @param obj Direction of mouse along both axis x, y ( -1 = negative, 1 = positive ) only required when moving etc.
	 * @param string The current resize handle || null
	 * @return void
	 */
	setAreaCoords: function( coords, moving, square, direction, resizeHandle ) {
		// dump( 'setAreaCoords (in) : ' + coords.x1 + ',' + coords.y1 + ',' + coords.x2 + ',' + coords.y2 );
		if( moving ) {
			// if moving
			var targW = coords.x2 - coords.x1;
			var targH = coords.y2 - coords.y1;
			
			// ensure we're within the bounds
			if( coords.x1 < 0 ) {
				coords.x1 = 0;
				coords.x2 = targW;
			}
			if( coords.y1 < 0 ) {
				coords.y1 = 0;
				coords.y2 = targH;
			}
			if( coords.x2 > this.imgW ) {
				coords.x2 = this.imgW;
				coords.x1 = this.imgW - targW;
			}
			if( coords.y2 > this.imgH ) {
				coords.y2 = this.imgH;
				coords.y1 = this.imgH - targH;
			}			
		} else {
			// ensure we're within the bounds
			if( coords.x1 < 0 ) coords.x1 = 0;
			if( coords.y1 < 0 ) coords.y1 = 0;
			if( coords.x2 > this.imgW ) coords.x2 = this.imgW;
			if( coords.y2 > this.imgH ) coords.y2 = this.imgH;
			
			// This is passed as null in onload
			if( direction != null ) {
								
				// apply the ratio or squaring where appropriate
				if( this.ratioX > 0 ) this.applyRatio( coords, { x: this.ratioX, y: this.ratioY }, direction, resizeHandle );
				else if( square ) this.applyRatio( coords, { x: 1, y: 1 }, direction, resizeHandle );
										
				var mins = [ this.options.minWidth, this.options.minHeight ]; // minimum dimensions [x,y]			
				var maxs = [ this.options.maxWidth, this.options.maxHeight ]; // maximum dimensions [x,y]
		
				// apply dimensions where appropriate
				if( mins[0] > 0 || mins[1] > 0 || maxs[0] > 0 || maxs[1] > 0) {
				
					var coordsTransX 	= { a1: coords.x1, a2: coords.x2 };
					var coordsTransY 	= { a1: coords.y1, a2: coords.y2 };
					var boundsX			= { min: 0, max: this.imgW };
					var boundsY			= { min: 0, max: this.imgH };
					
					// handle squaring properly on single axis minimum dimensions
					if( (mins[0] != 0 || mins[1] != 0) && square ) {
						if( mins[0] > 0 ) mins[1] = mins[0];
						else if( mins[1] > 0 ) mins[0] = mins[1];
					}
					
					if( (maxs[0] != 0 || maxs[0] != 0) && square ) {
						// if we have a max x value & it is less than the max y value then we set the y max to the max x (so we don't go over the minimum maximum of one of the axes - if that makes sense)
						if( maxs[0] > 0 && maxs[0] <= maxs[1] ) maxs[1] = maxs[0];
						else if( maxs[1] > 0 && maxs[1] <= maxs[0] ) maxs[0] = maxs[1];
					}
					
					if( mins[0] > 0 ) this.applyDimRestriction( coordsTransX, mins[0], direction.x, boundsX, 'min' );
					if( mins[1] > 1 ) this.applyDimRestriction( coordsTransY, mins[1], direction.y, boundsY, 'min' );
					
					if( maxs[0] > 0 ) this.applyDimRestriction( coordsTransX, maxs[0], direction.x, boundsX, 'max' );
					if( maxs[1] > 1 ) this.applyDimRestriction( coordsTransY, maxs[1], direction.y, boundsY, 'max' );
					
					coords = { x1: coordsTransX.a1, y1: coordsTransY.a1, x2: coordsTransX.a2, y2: coordsTransY.a2 };
				}
				
			}
		}
		
		// dump( 'setAreaCoords (out) : ' + coords.x1 + ',' + coords.y1 + ',' + coords.x2 + ',' + coords.y2 + '\n' );
		this.areaCoords = coords;
	},
	
	/**
	 * Applies the supplied dimension restriction to the supplied coordinates along a single axis
	 * 
	 * @access private
	 * @param obj Single axis coordinates, a1, a2 (e.g. for the x axis a1 = x1 & a2 = x2)
	 * @param int The restriction value
	 * @param int The direction ( -1 = negative, 1 = positive )
	 * @param obj The bounds of the image ( for this axis )
	 * @param string The dimension restriction type ( 'min' | 'max' )
	 * @return void
	 */
	applyDimRestriction: function( coords, val, direction, bounds, type ) {
		var check;
		if( type == 'min' ) check = ( ( coords.a2 - coords.a1 ) < val );
		else check = ( ( coords.a2 - coords.a1 ) > val );
		if( check ) {
			if( direction == 1 ) coords.a2 = coords.a1 + val;
			else coords.a1 = coords.a2 - val;
			
			// make sure we're still in the bounds (not too pretty for the user, but needed)
			if( coords.a1 < bounds.min ) {
				coords.a1 = bounds.min;
				coords.a2 = val;
			} else if( coords.a2 > bounds.max ) {
				coords.a1 = bounds.max - val;
				coords.a2 = bounds.max;
			}
		}
	},
		
	/**
	 * Applies the supplied ratio to the supplied coordinates
	 * 
	 * @access private
	 * @param obj Coordinates, x1, y1, x2, y2
	 * @param obj Ratio, x, y
	 * @param obj Direction of mouse, x & y : -1 == negative 1 == positive
	 * @param string The current resize handle || null
	 * @return void
	 */
	applyRatio : function( coords, ratio, direction, resizeHandle ) {
		// dump( 'direction.y : ' + direction.y + '\n');
		var newCoords;
		if( resizeHandle == 'N' || resizeHandle == 'S' ) {
			// dump( 'north south \n');
			// if moving on either the lone north & south handles apply the ratio on the y axis
			newCoords = this.applyRatioToAxis( 
				{ a1: coords.y1, b1: coords.x1, a2: coords.y2, b2: coords.x2 },
				{ a: ratio.y, b: ratio.x },
				{ a: direction.y, b: direction.x },
				{ min: 0, max: this.imgW }
			);
			coords.x1 = newCoords.b1;
			coords.y1 = newCoords.a1;
			coords.x2 = newCoords.b2;
			coords.y2 = newCoords.a2;
		} else {
			// otherwise deal with it as if we're applying the ratio on the x axis
			newCoords = this.applyRatioToAxis( 
				{ a1: coords.x1, b1: coords.y1, a2: coords.x2, b2: coords.y2 },
				{ a: ratio.x, b: ratio.y },
				{ a: direction.x, b: direction.y },
				{ min: 0, max: this.imgH }
			);
			coords.x1 = newCoords.a1;
			coords.y1 = newCoords.b1;
			coords.x2 = newCoords.a2;
			coords.y2 = newCoords.b2;
		}
		
	},
	
	/**
	 * Applies the provided ratio to the provided coordinates based on provided direction & bounds,
	 * use to encapsulate functionality to make it easy to apply to either axis. This is probably
	 * quite hard to visualise so see the x axis example within applyRatio()
	 * 
	 * Example in parameter details & comments is for requesting applying ratio to x axis.
	 * 
	 * @access private
	 * @param obj Coords object (a1, b1, a2, b2) where a = x & b = y in example
	 * @param obj Ratio object (a, b) where a = x & b = y in example
	 * @param obj Direction object (a, b) where a = x & b = y in example
	 * @param obj Bounds (min, max)
	 * @return obj Coords object (a1, b1, a2, b2) where a = x & b = y in example
	 */
	applyRatioToAxis: function( coords, ratio, direction, bounds ) {
		var newCoords = Object.extend( coords, {} );
		var calcDimA = newCoords.a2 - newCoords.a1;			// calculate dimension a (e.g. width)
		var targDimB = Math.floor( calcDimA * ratio.b / ratio.a );	// the target dimension b (e.g. height)
		var targB;											// to hold target b (e.g. y value)
		var targDimA;                                		// to hold target dimension a (e.g. width)
		var calcDimB = null;								// to hold calculated dimension b (e.g. height)
		
		// dump( 'newCoords[0]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n');
				
		if( direction.b == 1 ) {							// if travelling in a positive direction
			// make sure we're not going out of bounds
			targB = newCoords.b1 + targDimB;
			if( targB > bounds.max ) {
				targB = bounds.max;
				calcDimB = targB - newCoords.b1;			// calcuate dimension b (e.g. height)
			}
			
			newCoords.b2 = targB;
		} else {											// if travelling in a negative direction
			// make sure we're not going out of bounds
			targB = newCoords.b2 - targDimB;
			if( targB < bounds.min ) {
				targB = bounds.min;
				calcDimB = targB + newCoords.b2;			// calcuate dimension b (e.g. height)
			}
			newCoords.b1 = targB;
		}
		
		// dump( 'newCoords[1]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n');
			
		// apply the calculated dimensions
		if( calcDimB != null ) {
			targDimA = Math.floor( calcDimB * ratio.a / ratio.b );
			
			if( direction.a == 1 ) newCoords.a2 = newCoords.a1 + targDimA;
			else newCoords.a1 = newCoords.a1 = newCoords.a2 - targDimA;
		}
		
		// dump( 'newCoords[2]: ' + newCoords.a1 + ',' + newCoords.b1 + ','+ newCoords.a2 + ',' + newCoords.b2 + '\n');
			
		return newCoords;
	},
	
	/**
	 * Draws the select area
	 * 
	 * @access private
	 * @return void
	 */
	drawArea: function( ) {	
		/*
		 * NOTE: I'm not using the Element.setStyle() shortcut as they make it 
		 * quite sluggish on Mac based browsers
		 */
		// dump( 'drawArea        : ' + this.areaCoords.x1 + ',' + this.areaCoords.y1 + ',' + this.areaCoords.x2 + ',' + this.areaCoords.y2 + '\n' );
		var areaWidth     = this.calcW();
		var areaHeight    = this.calcH();
		
		/*
		 * Calculate all the style strings before we use them, allows reuse & produces quicker
		 * rendering (especially noticable in Mac based browsers)
		 */
		var px = 'px';
		var params = [
			this.areaCoords.x1 + px, 	// the left of the selArea
			this.areaCoords.y1 + px,		// the top of the selArea
			areaWidth + px,					// width of the selArea
			areaHeight + px,					// height of the selArea
			this.areaCoords.x2 + px,		// bottom of the selArea
			this.areaCoords.y2 + px,		// right of the selArea
			(this.img.width - this.areaCoords.x2) + px,	// right edge of selArea
			(this.img.height - this.areaCoords.y2) + px	// bottom edge of selArea
		];
				
		// do the select area
		var areaStyle				= this.selArea.style;
		areaStyle.left				= params[0];
		areaStyle.top				= params[1];
		areaStyle.width				= params[2];
		areaStyle.height			= params[3];
			  	
		// position the north, east, south & west handles
		var horizHandlePos = Math.ceil( (areaWidth - 6) / 2 ) + px;
		var vertHandlePos = Math.ceil( (areaHeight - 6) / 2 ) + px;
		
		this.handleN.style.left 	= horizHandlePos;
		this.handleE.style.top 		= vertHandlePos;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合天天综合给合国产| 午夜成人在线视频| 91蜜桃网址入口| 国产精品青草久久| eeuss国产一区二区三区| 综合激情成人伊人| 91国产精品成人| 日韩电影在线看| 久久久久久久久久久99999| 国产精品99久久久| 亚洲激情六月丁香| 欧美精品久久天天躁| 精品在线观看免费| 国产精品美女一区二区| 色综合激情五月| 日韩激情一区二区| 国产清纯美女被跳蛋高潮一区二区久久w| 国产69精品久久99不卡| 亚洲精品免费播放| 欧美大片在线观看| www.在线欧美| 午夜av电影一区| 中文成人av在线| 在线成人午夜影院| 国产高清精品在线| 亚洲一区二区欧美| 久久久国产精品午夜一区ai换脸| 91免费视频网址| 日本欧美在线看| 亚洲人成人一区二区在线观看 | 亚洲一区二区av在线| 日韩一区二区三区av| www.久久久久久久久| 亚洲午夜精品久久久久久久久| 久久综合色一综合色88| 日本丶国产丶欧美色综合| av不卡在线观看| 亚洲成人福利片| 国产精品天天看| 欧美一区二区三区男人的天堂| 成人18精品视频| 久久国产欧美日韩精品| 亚洲精选在线视频| 久久久亚洲欧洲日产国码αv| 欧美午夜片在线观看| 成人h动漫精品| 精品一区二区成人精品| 一区二区高清视频在线观看| 久久精品夜色噜噜亚洲a∨| 欧美丰满高潮xxxx喷水动漫| av电影在线观看一区| 国内成人免费视频| 丝袜亚洲另类丝袜在线| 亚洲欧美日韩国产手机在线| 国产日产欧产精品推荐色| 3d动漫精品啪啪一区二区竹菊| 99麻豆久久久国产精品免费| 国产一区啦啦啦在线观看| 丝袜诱惑制服诱惑色一区在线观看 | 日韩一区欧美二区| 亚洲欧美一区二区三区孕妇| 国产校园另类小说区| 91精品欧美一区二区三区综合在 | 国产一区在线观看麻豆| 日本不卡123| 亚洲成av人片在线| 一区二区三区精密机械公司| 中文字幕在线播放不卡一区| 欧美激情在线一区二区| 国产三级精品三级| 久久久久国色av免费看影院| 欧美va亚洲va香蕉在线| 日韩一级黄色大片| 日韩欧美一级二级三级久久久| 欧美视频日韩视频| 欧美综合一区二区| 欧美在线一区二区| 精品视频资源站| 欧美精品久久久久久久久老牛影院 | 欧美吞精做爰啪啪高潮| 欧美系列亚洲系列| 欧美日韩一区二区欧美激情| 欧美日韩在线亚洲一区蜜芽| 欧美日韩日日摸| 欧美久久久久中文字幕| 欧美一区二区精品在线| 7777精品伊人久久久大香线蕉的 | 久久精品国产999大香线蕉| 麻豆91在线观看| 精品一区二区精品| 成人免费毛片app| 91麻豆免费看片| 欧美性淫爽ww久久久久无| 91精品一区二区三区久久久久久| 精品日韩欧美在线| 久久久久亚洲蜜桃| 亚洲人快播电影网| 日韩精品欧美精品| 国产一区二区三区香蕉| 成人午夜碰碰视频| 欧美性色欧美a在线播放| 日韩一区二区三区电影在线观看| 久久久久久免费毛片精品| 国产精品久久久久久妇女6080 | 五月天欧美精品| 精品在线一区二区| 91一区一区三区| 欧美精品一二三区| 国产日韩欧美不卡在线| 一区二区三区鲁丝不卡| 免费不卡在线观看| 成人一道本在线| 在线免费观看日本欧美| 日韩一区二区不卡| 国产精品二三区| 日韩**一区毛片| 97se狠狠狠综合亚洲狠狠| 欧美日本在线看| 国产精品视频九色porn| 日韩黄色免费电影| 成人福利在线看| 8x8x8国产精品| 亚洲丝袜精品丝袜在线| 麻豆精品一区二区| 91麻豆6部合集magnet| 精品国精品自拍自在线| 一区二区成人在线| 国产米奇在线777精品观看| 91福利在线导航| 久久精品一二三| 性做久久久久久免费观看欧美| 风间由美中文字幕在线看视频国产欧美| 在线免费精品视频| 国产精品色婷婷久久58| 免费观看日韩av| 欧洲精品在线观看| 欧美激情中文不卡| 看片的网站亚洲| 欧美三级韩国三级日本一级| 中文字幕一区二| 精品一区二区三区香蕉蜜桃| 在线观看国产精品网站| 国产精品白丝在线| 国产精品综合一区二区三区| 欧美肥大bbwbbw高潮| 亚洲精品久久久久久国产精华液| 国产乱国产乱300精品| 欧美另类videos死尸| 亚洲一区二区三区视频在线播放| av一区二区三区| 国产欧美日韩亚州综合| 精品中文字幕一区二区| 日韩一区二区精品在线观看| 天堂久久一区二区三区| 欧美在线观看禁18| 亚洲一区二区欧美日韩 | 成人永久aaa| 国产色产综合产在线视频| 麻豆精品在线播放| 日韩一区二区三区视频在线观看| 无码av中文一区二区三区桃花岛| 在线中文字幕一区二区| 一区二区三区四区中文字幕| 91美女视频网站| 亚洲欧美经典视频| 色综合色狠狠天天综合色| 中文字幕人成不卡一区| 99久久久免费精品国产一区二区| 中文字幕一区二区在线观看| 国产成人av在线影院| 欧美激情一区二区在线| av中文字幕在线不卡| 自拍偷自拍亚洲精品播放| 色综合久久久久综合体桃花网| 亚洲精选视频在线| 欧美三级午夜理伦三级中视频| 亚洲午夜电影在线| 制服丝袜av成人在线看| 美女一区二区三区在线观看| 欧美不卡视频一区| 国产一区二区伦理| 中文字幕国产一区| 日本韩国欧美国产| 偷拍一区二区三区四区| 3d动漫精品啪啪1区2区免费 | 国产免费观看久久| 大桥未久av一区二区三区中文| 国产精品第13页| 欧洲激情一区二区| 麻豆成人av在线| 国产精品成人一区二区艾草| 在线精品视频一区二区| 日本人妖一区二区| 国产日本一区二区| 欧美自拍偷拍午夜视频| 男男视频亚洲欧美| 国产蜜臀av在线一区二区三区| 色av一区二区| 九九九精品视频| 亚洲精品五月天|