WordPress.org

Make WordPress Core

Changeset 22762


Ignore:
Timestamp:
11/21/2012 02:32:52 PM (8 years ago)
Author:
koopersmith
Message:

Media: Calculate image width and height when embedding images. see #21390.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/media-views.js

    r22750 r22762  
    558558
    559559            image.onload = function() {
    560                 if ( state === frame.state() && url === state.get('url') )
    561                     state.set( 'type', 'image' );
     560                if ( state !== frame.state() || url !== state.get('url') )
     561                    return;
     562
     563                state.set({
     564                    type:   'image',
     565                    width:  image.width,
     566                    height: image.height
     567                });
    562568            };
    563569
Note: See TracChangeset for help on using the changeset viewer.