Changeset 33053 for trunk/src/wp-admin/js/site-icon-crop.js
- Timestamp:
- 07/02/2015 09:15:52 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/site-icon-crop.js
r33049 r33053 17 17 ry = 64 / coords.h, 18 18 preview_rx = 16 / coords.w, 19 preview_ry = 16 / coords.h, 20 $cropImage = $( '#crop-image' ), 21 $homeIcon = $( '#preview-homeicon' ), 22 $favicon = $( '#preview-favicon' ); 19 preview_ry = 16 / coords.h; 23 20 24 $ homeIcon.css({25 width: Math.round(rx * $cropImage.attr( 'width' )) + 'px',26 height: Math.round(ry * $cropImage.attr( 'height' )) + 'px',21 $( '#preview-homeicon' ).css({ 22 width: Math.round(rx * wpSiteIconCropData.width ) + 'px', 23 height: Math.round(ry * wpSiteIconCropData.height ) + 'px', 27 24 marginLeft: '-' + Math.round(rx * coords.x) + 'px', 28 25 marginTop: '-' + Math.round(ry * coords.y) + 'px' 29 26 }); 30 27 31 $ favicon.css({32 width: Math.round( preview_rx * $cropImage.attr( 'width' )) + 'px',33 height: Math.round( preview_ry * $cropImage.attr( 'height' )) + 'px',28 $( '#preview-favicon' ).css({ 29 width: Math.round( preview_rx * wpSiteIconCropData.width ) + 'px', 30 height: Math.round( preview_ry * wpSiteIconCropData.height ) + 'px', 34 31 marginLeft: '-' + Math.round( preview_rx * coords.x ) + 'px', 35 32 marginTop: '-' + Math.floor( preview_ry* coords.y ) + 'px' … … 44 41 onSelect: siteIconCrop.updateCoords, 45 42 onChange: siteIconCrop.updateCoords, 43 trueSize: [ wpSiteIconCropData.width, wpSiteIconCropData.height ], 46 44 minSize: [ wpSiteIconCropData.min_size, wpSiteIconCropData.min_size ] 47 45 });
Note: See TracChangeset
for help on using the changeset viewer.