Site Icon: Center initial crop position.
Starting out at the center of the image makes for a better user experience. Props iseulde. Fixes #33050. Built from https://develop.svn.wordpress.org/trunk@33333 git-svn-id: http://core.svn.wordpress.org/trunk@33305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f535f2889b
commit
0ccb9c47cb
|
@ -1934,7 +1934,7 @@
|
|||
ratio = xInit / yInit,
|
||||
xImg = realWidth,
|
||||
yImg = realHeight,
|
||||
imgSelectOptions;
|
||||
x1, y1, imgSelectOptions;
|
||||
|
||||
controller.set( 'canSkipCrop', ! control.mustBeCropped( flexWidth, flexHeight, xInit, yInit, realWidth, realHeight ) );
|
||||
|
||||
|
@ -1946,6 +1946,9 @@
|
|||
yInit = xInit / ratio;
|
||||
}
|
||||
|
||||
x1 = ( xImg - xInit ) / 2;
|
||||
y1 = ( yImg - yInit ) / 2;
|
||||
|
||||
imgSelectOptions = {
|
||||
handles: true,
|
||||
keys: true,
|
||||
|
@ -1953,10 +1956,10 @@
|
|||
persistent: true,
|
||||
imageWidth: realWidth,
|
||||
imageHeight: realHeight,
|
||||
x1: 0,
|
||||
y1: 0,
|
||||
x2: xInit,
|
||||
y2: yInit
|
||||
x1: x1,
|
||||
y1: y1,
|
||||
x2: xInit + x1,
|
||||
y2: yInit + y1
|
||||
};
|
||||
|
||||
if ( flexHeight === false && flexWidth === false ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.3-beta3-33332';
|
||||
$wp_version = '4.3-beta3-33333';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue