David Catuhe 5 år sedan
förälder
incheckning
6625a1f46a

+ 0 - 12
nodeEditor/src/diagram/display/inputDisplayManager.ts

@@ -62,8 +62,6 @@ export class InputDisplayManager implements IDisplayManager {
     public updatePreviewContent(block: NodeMaterialBlock, contentArea: HTMLDivElement): void {
         let value = "";
         let inputBlock = block as InputBlock;
-        let isFat = false;
-        let smallFont = false;
 
         if (inputBlock.isAttribute) {
             value = "mesh." + inputBlock.name;
@@ -77,7 +75,6 @@ export class InputDisplayManager implements IDisplayManager {
                     break;
                 case NodeMaterialSystemValues.WorldViewProjection:
                     value = "World x View x Projection";
-                    isFat = true;
                     break;
                 case NodeMaterialSystemValues.View:
                     value = "View";
@@ -116,7 +113,6 @@ export class InputDisplayManager implements IDisplayManager {
                     value = `(${vec3Value.x.toFixed(2)}, ${vec3Value.y.toFixed(2)}, ${vec3Value.z.toFixed(2)})`;
                     break;
                 case NodeMaterialBlockConnectionPointTypes.Vector4:
-                    smallFont = true;
                     let vec4Value = inputBlock.value as Vector4
                     value = `(${vec4Value.x.toFixed(2)}, ${vec4Value.y.toFixed(2)}, ${vec4Value.z.toFixed(2)}, ${vec4Value.w.toFixed(2)})`;
                     break;                        
@@ -125,13 +121,5 @@ export class InputDisplayManager implements IDisplayManager {
 
         contentArea.innerHTML = value;
         contentArea.classList.add("input-block");
-
-        if (isFat) {
-            contentArea.classList.add("fat");
-        }
-
-        if (smallFont) {
-            contentArea.classList.add("small-font");
-        }
     }
 }

+ 4 - 6
nodeEditor/src/diagram/graphCanvas.scss

@@ -352,15 +352,13 @@
 
                     &.input-block {
                         grid-row: 2;
-                        height: 34px;
+                        min-height: 34px;
                         text-align: center;
                         font-size: 18px;
                         font-weight: bold;
-                        margin: 0 10px;
-
-                        &.fat {
-                            height: 54px;
-                        }
+                        margin: 0 10px 5px;
+                        display: grid;
+                        align-content: center;
 
                         &.small-font {                            
                             font-size: 17px;