Version 3.4.5
This commit is contained in:
1 parent
fb6b5baabc
commit
e4478369d8
1360 files changed
+228921
-179445
No files matched your search
+34
-23
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Image Cropper (v. 1.2.1 - 2009-10-06 )
|
||||
* Copyright (c) 2006-2009 David Spurr (http://www.defusion.org.uk/)
|
||||
* Image Cropper (v. 1.2.2 - 2011-07-04 )
|
||||
* Copyright (c) 2006-2011 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.
|
||||
@@ -26,12 +26,15 @@
|
||||
* 10 pixels )
|
||||
* - All operations stay within bounds of image
|
||||
* - All functionality & display compatible with most popular browsers supported by Prototype:
|
||||
* PC: IE 8, 7, 6 & 5.5, Firefox 2, 3, 3.5, Opera 8.5 (see known issues) & 9.0b
|
||||
* MAC: Camino 1.0, Firefox 2, 3, 3.5, Safari 3.x, 4
|
||||
* PC: IE 9, 8, 7, 6 & 5.5, Firefox 2+, Opera 8.5 (see known issues) & 9.0b +, Google Chrome
|
||||
* MAC: Camino 1.0, Firefox 2+, Safari 3.x+, Google Chrome
|
||||
*
|
||||
* Requires:
|
||||
* - Prototype v. 1.5.0_rc0 > (as packaged with Scriptaculous 1.6.1)
|
||||
* - Scriptaculous v. 1.6.1 > modules: dragdrop
|
||||
* Recommended (for IE9+ support):
|
||||
* - Prototype v. 1.7.0 >
|
||||
* - Scriptaculous v. 1.9.0 >
|
||||
*
|
||||
* Known issues:
|
||||
* - Safari animated gifs, only one of each will animate, this seems to be a known Safari issue
|
||||
@@ -58,6 +61,10 @@
|
||||
* See Cropper.Img & Cropper.ImgWithPreview for usage details
|
||||
*
|
||||
* Changelog:
|
||||
* v1.2.2 - 2011-07-04
|
||||
* + Support for latest versions of Prototype & script.aculo.us (1.7.0 & 1.9.0 respectively)
|
||||
* + Support notice for IE9
|
||||
*
|
||||
* v1.2.1 - 2009-10-06
|
||||
* + Added support for latest versions of Prototype & script.aculo.us
|
||||
* (1.6.1.0 & 1.8.2 respectively). Changes provided by Tom Hirashima.
|
||||
@@ -111,7 +118,7 @@
|
||||
* + Initial verison
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2006-2009, David Spurr (http://www.defusion.org.uk/)
|
||||
* Copyright (c) 2006-2011, David Spurr (http://www.defusion.org.uk/)
|
||||
*
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
@@ -586,12 +593,12 @@ Cropper.Img = Class.create({
|
||||
* @var int
|
||||
* The image width
|
||||
*/
|
||||
this.imgW = this.img.readAttribute('width');
|
||||
this.imgW = this.img.width;
|
||||
/**
|
||||
* @var int
|
||||
* The image height
|
||||
*/
|
||||
this.imgH = this.img.readAttribute('height');
|
||||
this.imgH = this.img.height;
|
||||
|
||||
$( this.north ).setStyle( { height: 0 } );
|
||||
$( this.east ).setStyle( { width: 0, height: 0 } );
|
||||
@@ -681,20 +688,24 @@ Cropper.Img = Class.create({
|
||||
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
|
||||
dir.y = 1;
|
||||
break;
|
||||
// IPS modification
|
||||
if( !e.shiftKey )
|
||||
{
|
||||
// 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
|
||||
dir.y = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( dir.x !== 0 || dir.y !== 0 ) {
|
||||
@@ -1019,8 +1030,8 @@ Cropper.Img = Class.create({
|
||||
areaHeight + px, // height of the selArea
|
||||
this.areaCoords.x2 + px, // bottom of the selArea
|
||||
this.areaCoords.y2 + px, // right of the selArea
|
||||
(this.img.readAttribute('width') - this.areaCoords.x2) + px, // right edge of selArea
|
||||
(this.img.readAttribute('height')- this.areaCoords.y2) + px // bottom edge of 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
|
||||
|
||||
Reference in new issue
Block a user