fixes
This commit is contained in:
@@ -28,8 +28,8 @@ class HorizontalLayout extends DefaultLayout {
|
||||
}
|
||||
|
||||
if (group.contentSize) {
|
||||
group.width = fixedSize;
|
||||
group.height = maxHeight;
|
||||
group.width = fixedSize + group.leftPadding + group.rightPadding;
|
||||
group.height = maxHeight + group.topPadding + group.bottomPadding;
|
||||
}
|
||||
|
||||
leftSize -= fixedSize;
|
||||
|
||||
@@ -27,8 +27,8 @@ class VerticalLayout extends DefaultLayout {
|
||||
}
|
||||
|
||||
if (group.contentSize) {
|
||||
group.width = maxWidth;
|
||||
group.height = fixedSize;
|
||||
group.width = maxWidth + group.leftPadding + group.rightPadding;
|
||||
group.height = fixedSize + group.topPadding + group.bottomPadding;
|
||||
}
|
||||
|
||||
leftSize -= fixedSize;
|
||||
|
||||
@@ -65,9 +65,21 @@ class BaseURLLoader<T> extends BaseLoader<T> {
|
||||
|
||||
override private function onError(e:Event):Void {
|
||||
var c:ICallback<T> = callback;
|
||||
var error:String = loader.data ? Std.string(loader.data) : null;
|
||||
var error:String = extrudeError(loader.data);
|
||||
dispose();
|
||||
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 flash.display.BitmapData;
|
||||
|
||||
typedef F = Tuple2<Dynamic, String>
|
||||
private typedef F = Tuple2<Dynamic, String>
|
||||
|
||||
class ResMap<T> extends StringMap<T> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user