fixes
This commit is contained in:
@@ -28,8 +28,8 @@ class HorizontalLayout extends DefaultLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (group.contentSize) {
|
if (group.contentSize) {
|
||||||
group.width = fixedSize;
|
group.width = fixedSize + group.leftPadding + group.rightPadding;
|
||||||
group.height = maxHeight;
|
group.height = maxHeight + group.topPadding + group.bottomPadding;
|
||||||
}
|
}
|
||||||
|
|
||||||
leftSize -= fixedSize;
|
leftSize -= fixedSize;
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ class VerticalLayout extends DefaultLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (group.contentSize) {
|
if (group.contentSize) {
|
||||||
group.width = maxWidth;
|
group.width = maxWidth + group.leftPadding + group.rightPadding;
|
||||||
group.height = fixedSize;
|
group.height = fixedSize + group.topPadding + group.bottomPadding;
|
||||||
}
|
}
|
||||||
|
|
||||||
leftSize -= fixedSize;
|
leftSize -= fixedSize;
|
||||||
|
|||||||
@@ -65,9 +65,21 @@ class BaseURLLoader<T> extends BaseLoader<T> {
|
|||||||
|
|
||||||
override private function onError(e:Event):Void {
|
override private function onError(e:Event):Void {
|
||||||
var c:ICallback<T> = callback;
|
var c:ICallback<T> = callback;
|
||||||
var error:String = loader.data ? Std.string(loader.data) : null;
|
var error:String = extrudeError(loader.data);
|
||||||
dispose();
|
dispose();
|
||||||
c.callFail(error != null ? error : e);
|
c.callFail(error != null ? error : e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private function extrudeError(data:Dynamic):String {
|
||||||
|
return if (data == null) null else {
|
||||||
|
var s:String = Std.string(data);
|
||||||
|
var r:EReg = ~/<h1>(.*?)<\/h1>/;
|
||||||
|
if (r.match(s)) {
|
||||||
|
r.matched(1);
|
||||||
|
} else {
|
||||||
|
s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import haxework.core.Tuple;
|
|||||||
import haxe.ds.StringMap;
|
import haxe.ds.StringMap;
|
||||||
import flash.display.BitmapData;
|
import flash.display.BitmapData;
|
||||||
|
|
||||||
typedef F = Tuple2<Dynamic, String>
|
private typedef F = Tuple2<Dynamic, String>
|
||||||
|
|
||||||
class ResMap<T> extends StringMap<T> {
|
class ResMap<T> extends StringMap<T> {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user