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

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

?? cropper.uncompressed.js

?? 在線裁切圖片
?? JS
?? 第 1 頁 / 共 4 頁
字號:
		 * Whether we've attached sucessfully
		 */
		this.attached		= false;
		/**
		 * @var boolean
		 * Whether we've got a fixed width (if minWidth EQ or GT maxWidth then we have a fixed width
		 * in the case of minWidth > maxWidth maxWidth wins as the fixed width)
		 */
		this.fixedWidth		= ( this.options.maxWidth > 0 && ( this.options.minWidth >= this.options.maxWidth ) );
		/**
		 * @var boolean
		 * Whether we've got a fixed height (if minHeight EQ or GT maxHeight then we have a fixed height
		 * in the case of minHeight > maxHeight maxHeight wins as the fixed height)
		 */
		this.fixedHeight	= ( this.options.maxHeight > 0 && ( this.options.minHeight >= this.options.maxHeight ) );
		
		// quit if the image element doesn't exist
		if( typeof this.img == 'undefined' ) return;
				
		// include the stylesheet		
		$A( document.getElementsByTagName( 'script' ) ).each( 
			function(s) {
				if( s.src.match( /cropper\.js/ ) ) {
					var path 	= s.src.replace( /cropper\.js(.*)?/, '' );
					// '<link rel="stylesheet" type="text/css" href="' + path + 'cropper.css" media="screen" />';
					var style 		= document.createElement( 'link' );
					style.rel 		= 'stylesheet';
					style.type 		= 'text/css';
					style.href 		= path + 'cropper.css';
					style.media 	= 'screen';
					document.getElementsByTagName( 'head' )[0].appendChild( style );
				}
	    	}
	    );   
	
		// calculate the ratio when neccessary
		if( this.options.ratioDim.x > 0 && this.options.ratioDim.y > 0 ) {
			var gcd = this.getGCD( this.options.ratioDim.x, this.options.ratioDim.y );
			this.ratioX = this.options.ratioDim.x / gcd;
			this.ratioY = this.options.ratioDim.y / gcd;
			// dump( 'RATIO : ' + this.ratioX + ':' + this.ratioY + '\n' );
		}
							
		// initialise sub classes
		this.subInitialize();

		// only load the event observers etc. once the image is loaded
		// this is done after the subInitialize() call just in case the sub class does anything
		// that will affect the result of the call to onLoad()
		if( this.img.complete || this.isWebKit ) this.onLoad(); // for some reason Safari seems to support img.complete but returns 'undefined' on the this.img object
		else Event.observe( this.img, 'load', this.onLoad.bindAsEventListener( this) );		
	},
	
	/**
	 * The Euclidean algorithm used to find the greatest common divisor
	 * 
	 * @acces private
	 * @param int Value 1
	 * @param int Value 2
	 * @return int
	 */
	getGCD : function( a , b ) {
		if( b == 0 ) return a;
		return this.getGCD(b, a % b );
	},
	
	/**
	 * Attaches the cropper to the image once it has loaded
	 * 
	 * @access private
	 * @return void
	 */
	onLoad: function( ) {
		/*
		 * Build the container and all related elements, will result in the following
		 *
		 * <div class="imgCrop_wrap">
		 * 		<img ... this.img ... />
		 * 		<div class="imgCrop_dragArea">
		 * 			<!-- the inner spans are only required for IE to stop it making the divs 1px high/wide -->
		 * 			<div class="imgCrop_overlay imageCrop_north"><span></span></div>
		 * 			<div class="imgCrop_overlay imageCrop_east"><span></span></div>
		 * 			<div class="imgCrop_overlay imageCrop_south"><span></span></div>
		 * 			<div class="imgCrop_overlay imageCrop_west"><span></span></div>
		 * 			<div class="imgCrop_selArea">
		 * 				<!-- marquees -->
		 * 				<!-- the inner spans are only required for IE to stop it making the divs 1px high/wide -->
		 * 				<div class="imgCrop_marqueeHoriz imgCrop_marqueeNorth"><span></span></div>
		 * 				<div class="imgCrop_marqueeVert imgCrop_marqueeEast"><span></span></div>
		 * 				<div class="imgCrop_marqueeHoriz imgCrop_marqueeSouth"><span></span></div>
		 * 				<div class="imgCrop_marqueeVert imgCrop_marqueeWest"><span></span></div>			
		 * 				<!-- handles -->
		 * 				<div class="imgCrop_handle imgCrop_handleN"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleNE"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleE"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleSE"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleS"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleSW"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleW"></div>
		 * 				<div class="imgCrop_handle imgCrop_handleNW"></div>
		 * 				<div class="imgCrop_clickArea"></div>
		 * 			</div>	
		 * 			<div class="imgCrop_clickArea"></div>
		 * 		</div>	
		 * </div>
		 */
		var cNamePrefix = 'imgCrop_';
		
		// get the point to insert the container
		var insertPoint = this.img.parentNode;
		
		// apply an extra class to the wrapper to fix Opera below version 9
		var fixOperaClass = '';
		if( this.isOpera8 ) fixOperaClass = ' opera8';
		this.imgWrap = Builder.node( 'div', { 'class': cNamePrefix + 'wrap' + fixOperaClass } );
		
		this.north		= Builder.node( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'north' }, [Builder.node( 'span' )] );
		this.east		= Builder.node( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'east' } , [Builder.node( 'span' )] );
		this.south		= Builder.node( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'south' }, [Builder.node( 'span' )] );
		this.west		= Builder.node( 'div', { 'class': cNamePrefix + 'overlay ' + cNamePrefix + 'west' } , [Builder.node( 'span' )] );
		
		var overlays	= [ this.north, this.east, this.south, this.west ];

		this.dragArea	= Builder.node( 'div', { 'class': cNamePrefix + 'dragArea' }, overlays );
						
		this.handleN	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleN' } );
		this.handleNE	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleNE' } );
		this.handleE	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleE' } );
		this.handleSE	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleSE' } );
		this.handleS	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleS' } );
		this.handleSW	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleSW' } );
		this.handleW	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleW' } );
		this.handleNW	= Builder.node( 'div', { 'class': cNamePrefix + 'handle ' + cNamePrefix + 'handleNW' } );
				
		this.selArea	= Builder.node( 'div', { 'class': cNamePrefix + 'selArea' },
			[
				Builder.node( 'div', { 'class': cNamePrefix + 'marqueeHoriz ' + cNamePrefix + 'marqueeNorth' }, [Builder.node( 'span' )] ),
				Builder.node( 'div', { 'class': cNamePrefix + 'marqueeVert ' + cNamePrefix + 'marqueeEast' }  , [Builder.node( 'span' )] ),
				Builder.node( 'div', { 'class': cNamePrefix + 'marqueeHoriz ' + cNamePrefix + 'marqueeSouth' }, [Builder.node( 'span' )] ),
				Builder.node( 'div', { 'class': cNamePrefix + 'marqueeVert ' + cNamePrefix + 'marqueeWest' }  , [Builder.node( 'span' )] ),
				this.handleN,
				this.handleNE,
				this.handleE,
				this.handleSE,
				this.handleS,
				this.handleSW,
				this.handleW,
				this.handleNW,
				Builder.node( 'div', { 'class': cNamePrefix + 'clickArea' } )
			]
		);
				
		this.imgWrap.appendChild( this.img );
		this.imgWrap.appendChild( this.dragArea );
		this.dragArea.appendChild( this.selArea );
		this.dragArea.appendChild( Builder.node( 'div', { 'class': cNamePrefix + 'clickArea' } ) );

		insertPoint.appendChild( this.imgWrap );

		// add event observers
		this.startDragBind 	= this.startDrag.bindAsEventListener( this );
		Event.observe( this.dragArea, 'mousedown', this.startDragBind );
		
		this.onDragBind 	= this.onDrag.bindAsEventListener( this );
		Event.observe( document, 'mousemove', this.onDragBind );
		
		this.endCropBind 	= this.endCrop.bindAsEventListener( this );
		Event.observe( document, 'mouseup', this.endCropBind );
		
		this.resizeBind		= this.startResize.bindAsEventListener( this );
		this.handles = [ this.handleN, this.handleNE, this.handleE, this.handleSE, this.handleS, this.handleSW, this.handleW, this.handleNW ];
		this.registerHandles( true );
		
		if( this.options.captureKeys ) {
			this.keysBind = this.handleKeys.bindAsEventListener( this );
			Event.observe( document, 'keypress', this.keysBind );
		}

		// attach the dragable to the select area
		new CropDraggable( this.selArea, { drawMethod: this.moveArea.bindAsEventListener( this ) } );
		
		this.setParams();
	},
	
	/**
	 * Manages adding or removing the handle event handler and hiding or displaying them as appropriate
	 * 
	 * @access private
	 * @param boolean registration true = add, false = remove
	 * @return void
	 */
	registerHandles: function( registration ) {	
		for( var i = 0; i < this.handles.length; i++ ) {
			var handle = $( this.handles[i] );
			
			if( registration ) {
				var hideHandle	= false;	// whether to hide the handle
				
				// disable handles asappropriate if we've got fixed dimensions
				// if both dimensions are fixed we don't need to do much
				if( this.fixedWidth && this.fixedHeight ) hideHandle = true;
				else if( this.fixedWidth || this.fixedHeight ) {
					// if one of the dimensions is fixed then just hide those handles
					var isCornerHandle	= handle.className.match( /([S|N][E|W])$/ )
					var isWidthHandle 	= handle.className.match( /(E|W)$/ );
					var isHeightHandle 	= handle.className.match( /(N|S)$/ );
					if( isCornerHandle ) hideHandle = true;
					else if( this.fixedWidth && isWidthHandle ) hideHandle = true;
					else if( this.fixedHeight && isHeightHandle ) hideHandle = true;
				}
				if( hideHandle ) handle.hide();
				else Event.observe( handle, 'mousedown', this.resizeBind );
			} else {
				handle.show();
				Event.stopObserving( handle, 'mousedown', this.resizeBind );
			}
		}
	},
		
	/**
	 * Sets up all the cropper parameters, this can be used to reset the cropper when dynamically
	 * changing the images
	 * 
	 * @access private
	 * @return void
	 */
	setParams: function() {
		/**
		 * @var int
		 * The image width
		 */
		this.imgW = this.img.width;
		/**
		 * @var int
		 * The image height
		 */
		this.imgH = this.img.height;			

		$( this.north ).setStyle( { height: 0 } );
		$( this.east ).setStyle( { width: 0, height: 0 } );
		$( this.south ).setStyle( { height: 0 } );
		$( this.west ).setStyle( { width: 0, height: 0 } );
		
		// resize the container to fit the image
		$( this.imgWrap ).setStyle( { 'width': this.imgW + 'px', 'height': this.imgH + 'px' } );
		
		// hide the select area
		$( this.selArea ).hide();
						
		// setup the starting position of the select area
		var startCoords = { x1: 0, y1: 0, x2: 0, y2: 0 };
		var validCoordsSet = false;
		
		// display the select area 
		if( this.options.onloadCoords != null ) {
			// if we've being given some coordinates to 
			startCoords = this.cloneCoords( this.options.onloadCoords );
			validCoordsSet = true;
		} else if( this.options.ratioDim.x > 0 && this.options.ratioDim.y > 0 ) {
			// if there is a ratio limit applied and the then set it to initial ratio
			startCoords.x1 = Math.ceil( ( this.imgW - this.options.ratioDim.x ) / 2 );
			startCoords.y1 = Math.ceil( ( this.imgH - this.options.ratioDim.y ) / 2 );
			startCoords.x2 = startCoords.x1 + this.options.ratioDim.x;
			startCoords.y2 = startCoords.y1 + this.options.ratioDim.y;
			validCoordsSet = true;
		}
		
		this.setAreaCoords( startCoords, false, false, 1 );
		
		if( this.options.displayOnInit && validCoordsSet ) {
			this.selArea.show();
			this.drawArea();
			this.endCrop();
		}
		
		this.attached = true;
	},
	
	/**
	 * Removes the cropper
	 * 
	 * @access public
	 * @return void
	 */
	remove: function() {
		if( this.attached ) {
			this.attached = false;
			
			// remove the elements we inserted
			this.imgWrap.parentNode.insertBefore( this.img, this.imgWrap );
			this.imgWrap.parentNode.removeChild( this.imgWrap );
			
			// remove the event observers
			Event.stopObserving( this.dragArea, 'mousedown', this.startDragBind );
			Event.stopObserving( document, 'mousemove', this.onDragBind );		
			Event.stopObserving( document, 'mouseup', this.endCropBind );
			this.registerHandles( false );
			if( this.options.captureKeys ) Event.stopObserving( document, 'keypress', this.keysBind );
		}
	},
	
	/**
	 * Resets the cropper, can be used either after being removed or any time you wish
	 * 
	 * @access public
	 * @return void
	 */
	reset: function() {
		if( !this.attached ) this.onLoad();
		else this.setParams();
		this.endCrop();
	},
	
	/**
	 * Handles the key functionality, currently just using arrow keys to move, if the user
	 * presses shift then the area will move by 10 pixels
	 */
	handleKeys: function( e ) {
		var dir = { x: 0, y: 0 }; // direction to move it in & the amount in pixels
		if( !this.dragging ) {
			
			// catch the arrow keys
			switch( e.keyCode ) {
				case( 37 ) : // left
					dir.x = -1;
					break;
				case( 38 ) : // up
					dir.y = -1;
					break;
				case( 39 ) : // right
					dir.x = 1;
					break
				case( 40 ) : // down

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜电影网亚洲视频| 精品福利一二区| 免费av成人在线| 久久久久高清精品| 欧美综合一区二区| 日韩av网站免费在线| 久久精品亚洲精品国产欧美kt∨| 粉嫩aⅴ一区二区三区四区五区| 亚洲一二三区在线观看| 精品国产91亚洲一区二区三区婷婷| 国产一区二区不卡| 亚洲一区在线观看网站| 日韩免费一区二区| 色欧美片视频在线观看在线视频| 久久精品久久久精品美女| 亚洲最新在线观看| 国产片一区二区三区| 精品国产伦一区二区三区免费| 日本高清无吗v一区| 成人精品亚洲人成在线| 国产综合色视频| 久久国产精品一区二区| 亚洲成在人线免费| 亚洲电影你懂得| 亚洲一二三专区| 亚洲国产欧美在线人成| 一区二区三区不卡视频在线观看| 亚洲黄色免费网站| 亚洲欧洲综合另类| 日日摸夜夜添夜夜添亚洲女人| 亚洲国产婷婷综合在线精品| 亚洲日本护士毛茸茸| 亚洲在线中文字幕| 免费观看成人av| 激情文学综合网| 国产一区视频导航| av网站一区二区三区| 在线播放欧美女士性生活| 日韩亚洲国产中文字幕欧美| 精品国产露脸精彩对白| 18涩涩午夜精品.www| 婷婷开心激情综合| 国产高清不卡一区二区| 一本大道久久a久久综合| 在线不卡一区二区| 国产精品欧美综合在线| 亚洲一区二区在线免费看| 青青草国产精品亚洲专区无| 国产河南妇女毛片精品久久久| a在线欧美一区| 欧美精品一区二区三区久久久| 亚洲精品视频自拍| 国产精品一级在线| 欧美日本一道本| 亚洲欧洲成人精品av97| 国产综合色视频| 欧美性感一类影片在线播放| 国产精品欧美极品| 激情综合色综合久久| 欧美顶级少妇做爰| 亚洲a一区二区| 日本韩国视频一区二区| 亚洲日本青草视频在线怡红院 | 国产精品一区二区不卡| 日韩欧美www| 日本不卡在线视频| 欧美精品xxxxbbbb| 夜夜嗨av一区二区三区| 在线观看视频一区二区欧美日韩| 亚洲视频一区二区免费在线观看| 国产很黄免费观看久久| 久久精品亚洲乱码伦伦中文| 国内精品国产三级国产a久久| 久久久亚洲欧洲日产国码αv| 男男gaygay亚洲| 欧美国产一区在线| 色综合激情五月| 日韩av电影天堂| 精品久久五月天| 春色校园综合激情亚洲| 亚洲另类中文字| 欧美一级高清片| 国产精品18久久久久| 国产精品你懂的| 欧美一区二区三区日韩| 国产激情视频一区二区三区欧美| 中文字幕av一区 二区| 在线视频欧美区| 久久精品国产**网站演员| 中文字幕乱码久久午夜不卡| 欧美日韩一区 二区 三区 久久精品| 亚洲一区二区三区四区在线观看| 精品国产免费一区二区三区四区| av不卡免费电影| 麻豆一区二区在线| 午夜精品福利视频网站| 中文字幕一区二区三区四区| 91精品国产91久久久久久最新毛片 | 国产精品原创巨作av| 久久99在线观看| 成人成人成人在线视频| 亚洲电影一区二区三区| 国产欧美日韩卡一| 日韩精品在线看片z| 日本国产一区二区| a4yy欧美一区二区三区| 国产在线精品一区二区不卡了 | 天天做天天摸天天爽国产一区| 久久综合九色综合欧美亚洲| 欧美写真视频网站| 色天天综合色天天久久| av成人免费在线| 成人精品一区二区三区四区| 99国产一区二区三精品乱码| 91免费视频网| 777奇米四色成人影色区| 精品裸体舞一区二区三区| 欧美成人一级视频| 日本一区二区免费在线观看视频| 欧美国产成人精品| 亚洲mv在线观看| 日韩综合小视频| 国产精品一二三在| 95精品视频在线| 日韩一区二区不卡| 亚洲人成伊人成综合网小说| 免费在线观看一区| 成人免费va视频| 日韩一区二区电影在线| 亚洲少妇30p| 风流少妇一区二区| 日韩一区二区三区在线| 成人app软件下载大全免费| 久久97超碰色| 精品国产91乱码一区二区三区| 日本va欧美va精品| 精品福利av导航| 国产一区二区在线观看视频| 欧美日韩在线亚洲一区蜜芽| 欧美经典一区二区| 国产成人av电影| 国产亚洲自拍一区| 国产精品一品视频| 久久久国际精品| 国产精品白丝av| 欧美激情中文不卡| 国产不卡视频在线播放| 久久久国际精品| 国产精品亚洲一区二区三区在线| 欧美日韩午夜精品| 日本少妇一区二区| 欧美第一区第二区| 国产一区二区三区免费播放| 精品久久久久香蕉网| 国产91综合网| 一区二区在线观看视频在线观看| 国产激情一区二区三区四区| 亚洲自拍都市欧美小说| 日韩午夜激情av| 99riav久久精品riav| 亚洲一区二区在线免费观看视频| 欧美人与性动xxxx| 国产精品99久久久久久久女警| 欧美激情一区二区三区四区| 91成人免费在线视频| 麻豆精品视频在线观看免费 | 日韩欧美国产不卡| 国产成人精品一区二区三区四区 | 精品国产1区二区| 色诱视频网站一区| 成人免费观看男女羞羞视频| 免费高清视频精品| 日本欧美肥老太交大片| 午夜精品一区二区三区三上悠亚| 中文字幕在线播放不卡一区| 26uuu精品一区二区| 26uuu国产电影一区二区| 欧美精品一区二区三区高清aⅴ | 成人av电影免费观看| 日韩综合小视频| 亚洲国产综合色| 中文字幕五月欧美| xnxx国产精品| 日韩亚洲欧美综合| 欧美肥妇毛茸茸| 日韩一区二区三区电影| 91啪亚洲精品| 一本色道久久综合亚洲aⅴ蜜桃 | 亚洲视频图片小说| 欧美电视剧免费全集观看| 制服.丝袜.亚洲.中文.综合| 色诱亚洲精品久久久久久| 岛国精品一区二区| 91污片在线观看| 91亚洲国产成人精品一区二三| 国产91丝袜在线18| 99久久er热在这里只有精品66| 国产盗摄视频一区二区三区| 精品一区二区三区av| 国产不卡在线视频|