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,
|
ratio = xInit / yInit,
|
||||||
xImg = realWidth,
|
xImg = realWidth,
|
||||||
yImg = realHeight,
|
yImg = realHeight,
|
||||||
imgSelectOptions;
|
x1, y1, imgSelectOptions;
|
||||||
|
|
||||||
controller.set( 'canSkipCrop', ! control.mustBeCropped( flexWidth, flexHeight, xInit, yInit, realWidth, realHeight ) );
|
controller.set( 'canSkipCrop', ! control.mustBeCropped( flexWidth, flexHeight, xInit, yInit, realWidth, realHeight ) );
|
||||||
|
|
||||||
@ -1946,6 +1946,9 @@
|
|||||||
yInit = xInit / ratio;
|
yInit = xInit / ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
x1 = ( xImg - xInit ) / 2;
|
||||||
|
y1 = ( yImg - yInit ) / 2;
|
||||||
|
|
||||||
imgSelectOptions = {
|
imgSelectOptions = {
|
||||||
handles: true,
|
handles: true,
|
||||||
keys: true,
|
keys: true,
|
||||||
@ -1953,10 +1956,10 @@
|
|||||||
persistent: true,
|
persistent: true,
|
||||||
imageWidth: realWidth,
|
imageWidth: realWidth,
|
||||||
imageHeight: realHeight,
|
imageHeight: realHeight,
|
||||||
x1: 0,
|
x1: x1,
|
||||||
y1: 0,
|
y1: y1,
|
||||||
x2: xInit,
|
x2: xInit + x1,
|
||||||
y2: yInit
|
y2: yInit + y1
|
||||||
};
|
};
|
||||||
|
|
||||||
if ( flexHeight === false && flexWidth === false ) {
|
if ( flexHeight === false && flexWidth === false ) {
|
||||||
|
2
wp-admin/js/customize-controls.min.js
vendored
2
wp-admin/js/customize-controls.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user