Author: solomax
Date: Mon Nov 30 13:58:16 2015
New Revision: 1717250
URL: http://svn.apache.org/viewvc?rev=1717250&view=rev
Log:
[OPENMEETINGS-1279] loaded images sizes are fixed
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omImage.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omImage.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omImage.lzx?rev=1717250&r1=1717249&r2=1717250&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omImage.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omImage.lzx
Mon Nov 30 13:58:16 2015
@@ -27,11 +27,17 @@
<method name="loadOmImage" args="ignore">
<![CDATA[
if (this.src != '' && this.src != null) {
- canvas.loadImgBySrc(this, this.src);
+ canvas.loadImgBySrc(this, this.src, completeCallback);
}
]]>
</method>
+ <method name="completeCallback" args="event">
+ //if($debug) Debug.write("[width, height] ", this.src,
this.sprite.imgLoader.width, this.sprite.imgLoader.height, this.width,
this.height);
+ this.sprite.imgLoader.width = this.width;
+ this.sprite.imgLoader.height = this.height;
+ </method>
+
<method name="loadOmSrc" args="src">
<![CDATA[
//if ($debug) Debug.write("omImage::loadOmSrc src ", src);
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx?rev=1717250&r1=1717249&r2=1717250&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/components/omMiniIcon.lzx
Mon Nov 30 13:58:16 2015
@@ -24,8 +24,14 @@
<attribute name="imgUrl" value="" type="string" />
<handler name="oninit">
- canvas.loadImgBySrc(this, imgUrl);
+ canvas.loadImgBySrc(this, imgUrl, completeCallback);
</handler>
+
+ <method name="completeCallback" args="event">
+ //if($debug) Debug.write("[width, height] ", imgUrl,
this.sprite.imgLoader.width, this.sprite.imgLoader.height, this.width,
this.height);
+ this.sprite.imgLoader.width = this.width;
+ this.sprite.imgLoader.height = this.height;
+ </method>
</class>
</library>
Modified:
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
URL:
http://svn.apache.org/viewvc/openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx?rev=1717250&r1=1717249&r2=1717250&view=diff
==============================================================================
---
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
(original)
+++
openmeetings/branches/3.1.x/openmeetings-flash/src/main/swf/base/mainMethods.lzx
Mon Nov 30 13:58:16 2015
@@ -25,10 +25,10 @@
<switch>
<when property="$as3">
<passthrough>
+ import flash.display.*;
+ import flash.events.*;
import flash.external.ExternalInterface;
import flash.net.*;
- import flash.net.*;
- import flash.display.*;
</passthrough>
</when>
</switch>
@@ -819,7 +819,7 @@
return canvas.isinitRoomDirect || canvas.remoteUserLogin ||
canvas.directUserLogin || canvas.secureRemoteUserLogin;
</method>
- <method name="loadImgBySrc" args="cmp, imgUrl">
+ <method name="loadImgBySrc" args="cmp, imgUrl, completeCallback">
cmp.sprite.resource = this.src;
if (!cmp.sprite.imgLoader) {
if (cmp.sprite.resourceContainer) {
@@ -836,7 +836,9 @@
if (res) {
res.scaleX = res.scaleY = 1.0;
}
-
+ if (completeCallback) {
+
cmp.sprite.imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
completeCallback);
+ }
cmp.sprite.imgLoader.load(new URLRequest(imgUrl),
LzSprite.loaderContext);
</method>
</library>