]> scripts.mit.edu Git - autoinstalls/wordpress.git/blobdiff - wp-includes/js/tinymce/plugins/image/plugin.js
WordPress 4.3-scripts
[autoinstalls/wordpress.git] / wp-includes / js / tinymce / plugins / image / plugin.js
index 8d755a5616cd325c8a4dc33d43fd8353668de137..f7d5a2bf7178947a4011784dcb5f3a0239e5d39a 100644 (file)
@@ -1,8 +1,8 @@
 /**
  * plugin.js
  *
- * Copyright, Moxiecode Systems AB
  * Released under LGPL License.
+ * Copyright (c) 1999-2015 Ephox Corp. All rights reserved
  *
  * License: http://www.tinymce.com/license
  * Contributing: http://www.tinymce.com/contributing
@@ -23,7 +23,7 @@ tinymce.PluginManager.add('image', function(editor) {
                }
 
                img.onload = function() {
-                       done(img.clientWidth, img.clientHeight);
+                       done(Math.max(img.width, img.clientWidth), Math.max(img.height, img.clientHeight));
                };
 
                img.onerror = function() {
@@ -308,6 +308,7 @@ tinymce.PluginManager.add('image', function(editor) {
                                        win.find('#src').value(e.control.value()).fire('change');
                                },
                                onPostRender: function() {
+                                       /*eslint consistent-this: 0*/
                                        imageListCtrl = this;
                                }
                        };