浏览代码

Fix HtmlText <a> tags increasing the height of the object

Leonardo Jeanteur 2 年之前
父节点
当前提交
4b757d512d
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      h2d/HtmlText.hx

+ 2 - 2
h2d/HtmlText.hx

@@ -604,10 +604,10 @@ class HtmlText extends Text {
 	}
 	}
 
 
 	function addNode( e : Xml, font : Font, align : Align, rebuild : Bool, metrics : Array<LineInfo> ) {
 	function addNode( e : Xml, font : Font, align : Align, rebuild : Bool, metrics : Array<LineInfo> ) {
-		inline function createInteractive() {
+		function createInteractive() {
 			if(aHrefs == null || aHrefs.length == 0)
 			if(aHrefs == null || aHrefs.length == 0)
 				return;
 				return;
-			aInteractive = new Interactive(0, metrics[sizePos].height, this);
+			aInteractive = new Interactive(0, metrics[sizePos].baseLine, this);
 			aInteractive.propagateEvents = propagateInteractiveNode;
 			aInteractive.propagateEvents = propagateInteractiveNode;
 			var href = aHrefs[aHrefs.length-1];
 			var href = aHrefs[aHrefs.length-1];
 			aInteractive.onClick = function(event) {
 			aInteractive.onClick = function(event) {