Skip to content

Commit 1d37edb

Browse files
author
as
committed
minor improvements
1 parent 3caccb1 commit 1d37edb

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

bin/Falcon.swc

133 Bytes
Binary file not shown.

src/com/hendrix/feathers/controls/core/sql/sqlSerialData/SQLSerialDataTable.as

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ package com.hendrix.feathers.controls.core.sql.sqlSerialData
1717
private var _TABLE_NAME: String;
1818

1919
// Contacts Table Columns names
20-
private static const KEY_ID: String = "id";
21-
private static const KEY_DATA: String = "data";
20+
protected static const KEY_ID: String = "id";
21+
protected static const KEY_DATA: String = "data";
2222

23-
private var _connection: SQLConnection = null;
23+
protected var _connection: SQLConnection = null;
2424

2525
private var _dbName: String = null;
2626
private var _dbPath: File = null;

src/com/hendrix/feathers/controls/core/sql/sqlSerialData/SQLUtils.as

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ package com.hendrix.feathers.controls.core.sql.sqlSerialData
2424
arr[ix].data = Serialize.stringToObject(arr[ix].data);
2525
}
2626

27-
2827
return arr;
2928
}
3029
}

src/com/hendrix/feathers/controls/flex/FlexImage.as

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,15 @@ package com.hendrix.feathers.controls.flex
1616
*
1717
* <ul>
1818
* <li>set <code>scaleMode</code> to <code>SCALEMODE_STRECTH, SCALEMODE_LETTERBOX, SCALEMODE_ZOOM, SCALEMODE_NONE</code></li>
19+
* <li>with <code>SCALEMODE_LETTERBOX</code> works even if one dimension is specified</li>
1920
* <li>set <code>_forceDisposeConcreteTexture</code> to control disposal of concrete textures</li>
2021
* <li>set <code>source</code> to MrGfxManager package paths ala "packA::map", or disk path "../assets/a.png"</li>
2122
* <li>set <code>color</code> to tint the image</li>
22-
* </ul>
23+
* </ul>
24+
*
25+
* <p/>
26+
* <b>TODO:</b>
27+
* <li>add alignment tools with <code>horizontalAlign/verticalAlign</code>
2328
*
2429
* @author Tomer Shalev
2530
*/
@@ -48,16 +53,6 @@ package com.hendrix.feathers.controls.flex
4853

4954
private var _color: int = -1;
5055

51-
/**
52-
* <p>a Flex comp Image container</p>
53-
* <ul>
54-
* <li>set <code>scaleMode</code> to <code>SCALEMODE_STRECTH, SCALEMODE_LETTERBOX, SCALEMODE_ZOOM, SCALEMODE_NONE</code></li>
55-
* <li>set <code>_forceDisposeConcreteTexture</code> to control disposal of concrete textures</li>
56-
* <li>set <code>source</code> to MrGfxManager package paths ala "packA::map", or disk path "../assets/a.png"</li>
57-
* </ul>
58-
* </p>
59-
* @author Tomer Shalev
60-
*/
6156
public function FlexImage()
6257
{
6358
super();
@@ -240,7 +235,7 @@ package com.hendrix.feathers.controls.flex
240235
ar = Math.min(arW, arH);
241236
if(ar == 0)
242237
ar = Math.max(arW, arH);
243-
imgW = _img.texture.width * ar;
238+
imgW = _img.texture.width * ar;
244239
imgH = _img.texture.height * ar;
245240
break;
246241
}
@@ -293,6 +288,9 @@ package com.hendrix.feathers.controls.flex
293288
_img.width = imgW;
294289
_img.height = imgH;
295290

291+
_img.x =(width - _img.width) * 0.5;
292+
_img.y =(height - _img.height) * 0.5;
293+
296294
if(width == 0)
297295
width = imgW;
298296

src/com/hendrix/feathers/controls/flex/HGroup.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ package com.hendrix.feathers.controls.flex
361361
// if width was not set, then we give the width that the children occupy
362362
if(width == 0) {
363363
explicitWidth = NaN;
364-
var c: Number = isNaN(percentHeight) ? 0 : percentWidth*relativeCalcWidthParent.width;
364+
var c: Number = isNaN(percentWidth) ? 0 : percentWidth*relativeCalcWidthParent.width;
365365
var a: Boolean = setSizeInternal(Math.max(posx, c), height, false);
366366
}
367367

src/com/hendrix/feathers/controls/utils/serialize/Serialize.as

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,22 @@ package com.hendrix.feathers.controls.utils.serialize
1818
return Base64.encodeByteArray(ba);
1919
}
2020

21-
static public function objectToString(obj:Object):String
22-
{
23-
_byteArray.position = 0;
24-
_byteArray.length = 0;
25-
_byteArray.writeObject(obj);
26-
27-
return Base64.encodeByteArray(_byteArray);
28-
}
29-
21+
static public function objectToString(obj:Object):String
22+
{
23+
return Base64.encodeByteArray(objectToByteArray(obj));
24+
}
25+
26+
static public function objectToByteArray(obj:Object, $ba: ByteArray = null):ByteArray
27+
{
28+
var ba: ByteArray = $ba ? $ba : new ByteArray();
29+
30+
ba.position = 0;
31+
32+
ba.writeObject(obj);
33+
34+
return ba;
35+
}
36+
3037
static public function stringToObject(data:String):Object
3138
{
3239
var ba: ByteArray = Base64.decodeToByteArray(data);

0 commit comments

Comments
 (0)