Browse Source

Crop text in Level3D scene tree

Tom SPIRA 6 years ago
parent
commit
1c9acf8724
3 changed files with 14 additions and 0 deletions
  1. 6 0
      bin/style.css
  2. 7 0
      bin/style.less
  3. 1 0
      hide/view/l3d/Level3D.hx

+ 6 - 0
bin/style.css

@@ -1099,6 +1099,12 @@ body.hide-subview .lm_controls {
   line-height: 18px;
   height: 18px;
 }
+.jstree.small .jstree-anchor.crop {
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  overflow: hidden;
+  width: 230px;
+}
 .jstree.small .jstree-icon {
   width: 18px;
   height: 18px;

+ 7 - 0
bin/style.less

@@ -1219,6 +1219,13 @@ body.hide-subview {
 	.jstree-anchor {
 		line-height: @size;
 		height: @size;
+
+		&.crop {
+			text-overflow: ellipsis;
+			white-space: nowrap;
+			overflow: hidden;
+			width: 230px;
+		}
 	}
 	.jstree-icon {
 		width: @size;

+ 1 - 0
hide/view/l3d/Level3D.hx

@@ -640,6 +640,7 @@ class Level3D extends FileView {
 			style = Reflect.field(styles, p.name);
 		}
 		var a = el.find("a").first();
+		a.addClass("crop");
 		if(style == null)
 			a.removeAttr("style");
 		else