From c7aa76adde91e627fe04f16e17ed7d0fb2cb3f1b Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 31 Mar 2021 17:48:06 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js Roo/bootstrap/Card.js --- Roo/bootstrap/Card.js | 2 +- roojs-bootstrap-debug.js | 6 +++--- roojs-bootstrap.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Roo/bootstrap/Card.js b/Roo/bootstrap/Card.js index 0d47c36285..2b030e79a2 100644 --- a/Roo/bootstrap/Card.js +++ b/Roo/bootstrap/Card.js @@ -758,7 +758,7 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { return; } - var hw = he.naturalHeight / heom.naturalWidth; + var hw = he.naturalHeight / he.naturalWidth; // wide image = < 0 // tall image = > 1 //var w = he.dom.naturalWidth; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 820e3dae44..34321bcc3a 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2693,13 +2693,13 @@ Roo.extend(Roo.bootstrap.Card, Roo.bootstrap.Component, { return; } - var hw = he.dom.naturalHeight / he.dom.naturalWidth; + var hw = he.naturalHeight / heom.naturalWidth; // wide image = < 0 // tall image = > 1 //var w = he.dom.naturalWidth; - var ww = he.dom.width; + var ww = he.width; if (hw > 1) { - he.setSize( ww * (1/hw), ww); + Roo.get(he).setSize( ww * (1/hw), ww); } } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 68d742b82b..85a9fe093d 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -111,7 +111,7 @@ this.el.removeClass('roo-card-rotated');this.el.removeClass('d-none');if(this.ro this.el.select('.roo-collapsable').removeClass('show');this.rotated=true;this.fireEvent('rotate',this,this.rotated);},dropPlaceHolder:function(A,B,C){if(this.dropEl===false){this.dropEl=Roo.DomHelper.append(this.containerEl,{cls:'d-none'},true);}this.dropEl.removeClass(['d-none','d-block']); if(A=='hide'){this.dropEl.addClass('d-none');return;}this.dropEl.dom.parentNode.removeChild(this.dropEl.dom);if(B.card!==true){var D=B.card.el.dom;if(B.position=='above'){D.parentNode.insertBefore(this.dropEl.dom,D);}else if(D.nextSibling){D.parentNode.insertBefore(this.dropEl.dom,D.nextSibling); }else{D.parentNode.append(this.dropEl.dom);}}else{this.containerEl.dom.append(this.dropEl.dom);}this.dropEl.addClass('d-block roo-card-dropzone');this.dropEl.setHeight(Roo.get(C.ddel).getHeight());},setHeaderText:function(A){this.header=A;if(this.headerContainerEl){this.headerContainerEl.dom.innerHTML=A; -}},onHeaderImageLoad:function(ev,he){if(!this.header_image_fit_square){return;}var hw=he.dom.naturalHeight/he.dom.naturalWidth;var ww=he.dom.width;if(hw>1){he.setSize(ww*(1/hw),ww);}}}); +}},onHeaderImageLoad:function(ev,he){if(!this.header_image_fit_square){return;}var hw=he.naturalHeight/heom.naturalWidth;var ww=he.width;if(hw>1){Roo.get(he).setSize(ww*(1/hw),ww);}}}); // Roo/bootstrap/CardHeader.js Roo.bootstrap.CardHeader=function(A){Roo.bootstrap.CardHeader.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.CardHeader,Roo.bootstrap.Element,{container_method:'getCardHeader'}); // Roo/bootstrap/CardFooter.js -- 2.39.2